Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/juliangruber/util-promisify
Node 8's util.promisify, as a node module
https://github.com/juliangruber/util-promisify
Last synced: 13 days ago
JSON representation
Node 8's util.promisify, as a node module
- Host: GitHub
- URL: https://github.com/juliangruber/util-promisify
- Owner: juliangruber
- License: other
- Created: 2017-06-11T08:09:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-02-23T09:55:59.000Z (9 months ago)
- Last Synced: 2024-05-01T23:21:00.612Z (7 months ago)
- Language: JavaScript
- Size: 30.3 KB
- Stars: 20
- Watchers: 4
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: .github/SECURITY.md
Awesome Lists containing this project
README
# util-promisify
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!
Supports [all major node versions](https://github.com/nodejs/LTS#lts-schedule1).
[![build status](https://travis-ci.org/juliangruber/util-promisify.svg?branch=master)](http://travis-ci.org/juliangruber/util-promisify)
[![downloads](https://img.shields.io/npm/dm/util-promisify.svg)](https://www.npmjs.org/package/util-promisify)
[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/util-promisify.svg)](https://greenkeeper.io/)## Usage
```js
const promisify = require('util-promisify');
const fs = require('fs');const stat = promisify(fs.stat);
stat('/tmp/').then(s => {
// ...
});
```## Installation
```bash
$ npm install util-promisify
```## API
See `util.promisify`'s [API docs](https://nodejs.org/api/util.html#util_util_promisify_original).
### promisify(original)
### (Symbol) promisify.customIf available, the Symbol is reexported from node core's `util` module.
## License
MIT