pdenodeify

v0.1.0
A denodeify that doesn't suck

Build Status

pdenodeify

Dead simple denodeify function for Promises. Supports native promises, when they come to Node and/or the browser, falling back to es6-promise if the global isn't available. Since the polyfill is optional you'll need to include it yourself (in Node just make sure it's installed).

Example

var denodeify = require('pdenodeify');
var readFile = denodeify(require('fs').readFile);

readFile('path/to/file').then(function(data) {
  // Use data
});

License

MIT

npm i pdenodeify

Metadata

  • MIT
  • Whatever
  • Matthew Phillips
  • released 2/17/2015

Downloads

Maintainers