-
-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to support non-error-first APIs #31
Labels
Comments
I almost never have to use rfpify to be honest. But I'm not using as much obscure API'S as you do :p. So yes, it might be easier to add an option here. |
Me neither. Only if I need to catch some event when testing. |
WebTorrent uses this sometimes: client.add(magnetURI, function (torrent) { // no error parameter
// Got torrent metadata!
console.log('Client is downloading:', torrent.infoHash)
}) |
Just got bit by pify((a, b) => fs.exists(a, (c) => b(null, c))) |
sindresorhus
changed the title
Add option to support non-error first API's
Add option to support non-error-first APIs
Apr 18, 2017
sindresorhus
added a commit
that referenced
this issue
Apr 18, 2017
sindresorhus
added a commit
that referenced
this issue
May 27, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Initially, I didn't want this as it's a bad practise, so I asked @SamVerschueren to make a module.
After using
pify
for a good while, I've needed it more often than I would have liked, with a few Node.js API's (fs.exists), events, Chrome extension API's, and browser API's.Instead of pretty much duplicating most of the code here into
rfpify
, I think we should add an option for it here instead.@SamVerschueren Thoughts?
The text was updated successfully, but these errors were encountered: