Miss any of our Open RFC calls?Watch the recordings here! »

n2p

0.0.2 • Public • Published

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

Install

npm i n2p

DownloadsWeekly Downloads

1

Version

0.0.2

License

MIT

Last publish

Collaborators

  • avatar