|
|
пре 6 дана | |
|---|---|---|
| .. | ||
| test | пре 6 дана | |
| .npmignore | пре 6 дана | |
| .travis.yml | пре 6 дана | |
| LICENSE | пре 6 дана | |
| README.md | пре 6 дана | |
| index.js | пре 6 дана | |
| package.json | пре 6 дана | |
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