sindresorhus / hook-std

Hook and modify stdout and stderr
MIT License
54 stars 12 forks source link

API change: Return Promise instead of function #13

Closed acostalima closed 6 years ago

acostalima commented 7 years ago

Resolves #7

satazor commented 7 years ago

As per #13 discussion, I think that a unhook method on the returned promise is missing.

Is that right @sindresorhus ?

sindresorhus commented 7 years ago

I think that a unhook method on the returned promise is missing. Is that right @sindresorhus ?

Correct

acostalima commented 7 years ago

Thanks for the feedback @sindresorhus @satazor The implementation should be as desired now. I have also reverted the existing tests to test.serial and test.serial.cb and added a few more specifically to verify that the promise resolves when unhook is called either from promise or callback.

acostalima commented 6 years ago

Hey @sindresorhus, I completely forgot to finish this PR! My apologies. I made some improvements to the code since my last commit. Please have look to the most recent changes I've made.

Thanks!

acostalima commented 6 years ago

ping @sindresorhus

acostalima commented 6 years ago

ping @sindresorhus

acostalima commented 6 years ago

ping @sindresorhus

acostalima commented 6 years ago

ping @sindresorhus

sindresorhus commented 6 years ago

This looks great. Sorry for the long delay. I have more than 300 PRs to review.

leo-celebrate