3.0.0 • Published 8 years ago

simplethunkify v3.0.0

Weekly downloads
4
License
Apache-2.0
Repository
github
Last release
8 years ago

simple-thunkify

Build Status Codeship Status for ppgs8903/simplethunkify

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