sindresorhus / hook-std

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

Add `once` option to automatically unhook after the first call #11

Closed ruimarques closed 7 years ago

ruimarques commented 7 years ago

Hello @sindresorhus !

I hope this is what you where looking for with #1. I wasn't sure so I set its default behavior as false.

I also replaced new Buffer() with Buffer.from() within the test cases, because that was giving me deprecated errors and breaking the tests. Let me know if that should have been made in a separated PR.

Fixes #1

sindresorhus commented 7 years ago

Looks great. Thank you @ruimarques :)

ruimarques commented 7 years ago

Cool!