util-promisify
v3.0.0
Published
Node 8's util.promisify, as a node module
Downloads
3,008,760
Readme
util-promisify
Node 8's require('util').promisify
as a node module, so you can use it right now!
Supports all major node versions.
Usage
const promisify = require('util-promisify');
const fs = require('fs');
const stat = promisify(fs.stat);
stat('/tmp/').then(s => {
// ...
});
Installation
$ npm install util-promisify
API
See util.promisify
's API docs.
promisify(original)
(Symbol) promisify.custom
If available, the Symbol is reexported from node core's util
module.
License
MIT