Skip to content

This module add promise version to all node module functions

Notifications You must be signed in to change notification settings

gitter-badger/node-promises

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-promises

NPM version Download stats

NPM stats

This module add promise version to all node module functions

Example:

var nodePromise = require('node-promises');
var fs = nodePromise('fs');

fs.existsPromise(__filename)
.spread(function(exists) { //exists=true
  return fs.mkdirPromise(__dirname + '/test');
}).spread(function() {
  // test folder has been created
});

since the promise return the argument array of the callback you should prefer use spread instead then

About

This module add promise version to all node module functions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%