simplethunkify
v3.0.0
Published
node-thunkify simple implementation, support: study
Downloads
2
Readme
simple-thunkify
node-thunkify simple implementation. support: study.
Installation
npm install --save-dev simplethunkify
Example
###brfore
var fs= require('fs');
fs.readFile('package.json', 'utf8', function(err,data){
if (err) {
throw err;
} else {
console.log(data);
}
})
###after
var simplethunkify = require('simplethunkify');
var fs = require('fs');
var read = simplethunkify(fs.readFile);
read('package.json', 'utf8')(function(err, str){
});
Contributors
Author: Jason Tao
License
Apache-2.0