micro-promisify
v0.2.0
Published
Convert callback-based function into promise. Simple, 10LOC, no deps.
Downloads
21,354
Maintainers
Readme
micro-promisify
Convert callback-based function into promise. Simple, 10LOC, no deps.
Usage
const promisify = require('micro-promisify');
const fs = require('fs');
const promise = promisify(fs.readFile)('filename.txt');
Runtime support
Node.js 4+ and modern browsers only.
License
MIT (c) 2016 Paul Miller (http://paulmillr.com)