1.0.1 • Published 8 years ago

then-nodeify v1.0.1

Weekly downloads
173
License
WTFPL
Repository
github
Last release
8 years ago

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

Build Status

Converts a function that returns a promise into one that calls an error-first callback when the promise is resolved.

var nodeify = require('nodeify')

var doThing = nodeify(functionThatReturnsAPromise)

doThing('/tmp/butts', function(err, results) {

})