Skip to content
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

How does this differ from util.promisfy #62

Closed
mfour-merickson opened this issue Jun 25, 2018 · 1 comment
Closed

How does this differ from util.promisfy #62

mfour-merickson opened this issue Jun 25, 2018 · 1 comment

Comments

@mfour-merickson
Copy link

Other than the fact that it was created by the uber awesome @sindresorhus I am curious how this differs from util.promisfy?

@fspoettel
Copy link

There are a few notable differences:

  • The main difference lies in engine support: util.promisify was introduced fairly recently in Node 8. This package supports Node 6 and up.
  • There are slight differences in how callbacks with multiple arguments are handled, see pify and util.promisify
  • pify allows to wrap full modules, util.promisify only allows to wrap individual functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants