|
|
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