then-denodeify

1.0.1 • Public • Published

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

Build Status

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

var denodeify = require('then-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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    66
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    66
  • 1.0.0
    2,833

Package Sidebar

Install

npm i then-denodeify

Weekly Downloads

2,899

Version

1.0.1

License

WTFPL

Last publish

Collaborators

  • tehshrike