sfcode
An Online Competing and Development Environment
|
Node 8's ‘require('util’).promisify` as a node module, so you can use it right now!
Supports all major node versions.
See util.promisify
's API docs.
If available, the Symbol is reexported from node core's util
module.
MIT
Polyfill for util.promisify in node versions < v8
node v8.0.0 added support for a built-in util.promisify
: https://github.com/nodejs/node/pull/12442/
This package provides the built-in util.promisify
in node v8.0.0 and later, and a replacement in other environments.
Direct
Shim
Note: this package requires a native ES5 environment, and for Promise
to be globally available. It will throw upon requiring it if these are not present.
If you want to promisify a whole module, like the fs
module, you can use util.promisify-all
.