just-promiseify
v1.1.1
Published
It's a very simple library to convert callback-based flow into Promise style
Downloads
32
Readme
just-promiseify
It's a very simple library to convert callback-based flow into Promise style
just-promiseify
can be used in bothnode
andbrowser
env.
Installation
npm install just-promiseify --save
Usage
var promiseify = require('just-promiseify');
var fs = require('fs');
var readFile = promiseify(fs.readFile);
readFile(txt, 'utf8')
.then(function(data) {
console.log('The file content is',data);
})
.catch(function(err){
console.error('Error', err);
});