n2p
v0.0.2
Published
node-style callback to promise
Downloads
4
Readme
n2p - node-style callback to promise
Usage
var n2p = require('n2p');
async function foo() {
return await n2p(function(cb) {
fs.readFile('foo.txt', cb)
})
}
Or in livescript (with the async syntax)
require! n2p
foo = ->>
return await n2p -> fs.readFile('foo.txt', it)
Licence
MIT
Credits
By Geza Kovacs