then-denodeify
[![NPM](https://nodei.co/npm/then-denodeify.png)](https://nodei.co/npm/then-denodeify/)
Last updated 3 years ago by tehshrike .
WTFPL · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install then-denodeify 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 1.0.1                                ...           latest (3 years ago)

2 Versions

  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 3
This Month 3
Last Day 2
Last Week 0
Last Month 5
Dependencies (0)
None
Dev Dependencies (3)

Copyright 2014 - 2016 © taobao.org |