Name |
Date |
Size |
#Lines |
LOC |
||
---|---|---|---|---|---|---|
.. | - | - | ||||
test/ | 12-May-2024 | - | 291 | 225 | ||
.npmignore | D | 12-May-2024 | 13 | 2 | 1 | |
.travis.yml | D | 12-May-2024 | 69 | 9 | 8 | |
LICENSE | D | 12-May-2024 | 52.8 KiB | 1,073 | 915 | |
README.md | D | 12-May-2024 | 1.1 KiB | 43 | 26 | |
index.js | D | 12-May-2024 | 2.9 KiB | 92 | 68 | |
package.json | D | 12-May-2024 | 1.3 KiB | 46 | 45 |
README.md
1 2 # util-promisify 3 4 Node 8's [`require('util').promisify`](https://nodejs.org/api/util.html#util_util_promisify_original) as a node module, so you can use it right now! 5 6 Supports [all major node versions](https://github.com/nodejs/LTS#lts-schedule1). 7 8 [](http://travis-ci.org/juliangruber/util-promisify) 9 [](https://www.npmjs.org/package/util-promisify) 10 [](https://greenkeeper.io/) 11 12 ## Usage 13 14 ```js 15 const promisify = require('util-promisify'); 16 const fs = require('fs'); 17 18 const stat = promisify(fs.stat); 19 20 stat('/tmp/').then(s => { 21 // ... 22 }); 23 ``` 24 25 ## Installation 26 27 ```bash 28 $ npm install util-promisify 29 ``` 30 31 ## API 32 33 See `util.promisify`'s [API docs](https://nodejs.org/api/util.html#util_util_promisify_original). 34 35 ### promisify(original) 36 ### (Symbol) promisify.custom 37 38 If available, the Symbol is reexported from node core's `util` module. 39 40 ## License 41 42 MIT 43