0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/deps/npm/node_modules/util-promisify
..
test
.npmignore
.travis.yml
index.js
LICENSE
package.json
README.md

util-promisify

Node 8's require('util').promisify as a node module, so you can use it right now!

Supports all major node versions.

build status downloads Greenkeeper badge

Usage

const promisify = require('util-promisify');
const fs = require('fs');

const stat = promisify(fs.stat);

stat('/tmp/').then(s => {
  // ...
});

Installation

$ npm install util-promisify

API

See util.promisify's API docs.

promisify(original)

(Symbol) promisify.custom

If available, the Symbol is reexported from node core's util module.

License

MIT