|
2 жил өмнө | |
---|---|---|
.. | ||
test | 2 жил өмнө | |
.npmignore | 2 жил өмнө | |
.travis.yml | 2 жил өмнө | |
LICENSE | 2 жил өмнө | |
README.md | 2 жил өмнө | |
index.js | 2 жил өмнө | |
package.json | 2 жил өмнө |
Node 8's require('util').promisify
as a node module, so you can use it right now!
Supports all major node versions.
const promisify = require('util-promisify');
const fs = require('fs');
const stat = promisify(fs.stat);
stat('/tmp/').then(s => {
// ...
});
$ npm install util-promisify
See util.promisify
's API docs.
If available, the Symbol is reexported from node core's util
module.
MIT