|
|
il y a 3 ans | |
|---|---|---|
| .. | ||
| test | il y a 3 ans | |
| .npmignore | il y a 3 ans | |
| .travis.yml | il y a 3 ans | |
| LICENSE | il y a 3 ans | |
| README.md | il y a 3 ans | |
| index.js | il y a 3 ans | |
| package.json | il y a 3 ans | |
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