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

then-denodeify

1.0.0 • Public • Published

Copied from https://github.com/then/promise/blob/master/src/node-extensions.js but without anything else attached.

Build Status

Converts a function that calls an error-first callback into a function that returns a promise.

var denodeify = require('denodeify')
 
var stat = denodeify(fs.stat)
 
stat('/tmp/butts').then(function(results) {
 
})

However if the original function happens to return a promise instead of calling the callback, everything will work as it should.

Install

npm i [email protected]

Version

1.0.0

License

WTFPL

Last publish

Collaborators

  • avatar