fs-monkey icon indicating copy to clipboard operation
fs-monkey copied to clipboard

Support promises API in patchFs

Open aleung opened this issue 4 years ago • 4 comments

  • Fix #202

aleung avatar Feb 09 '21 11:02 aleung

@streamich Would you review this PR?

aleung avatar Apr 21 '21 15:04 aleung

@aleung sorry for the delay - is there a reason why you've used Object.defineProperty instead of just assigning like we do with other methods?

G-Rath avatar Jun 02 '23 20:06 G-Rath

It was a long time since I wrote the code. I can't exactly remember the reason.

I think I don't want promises to be a normal property of the object:

By default, properties added using Object.defineProperty() are not writable, not enumerable, and not configurable.

More explanation is in https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/defineProperty#description

aleung avatar Jun 08 '23 14:06 aleung

Hey there! Is there a reason this is not merged by now? :) I'm looking forward to use the library, however, this is a dealbreaker as I need to patch promise calls to FS.

sladg avatar Nov 20 '23 14:11 sladg