Website/node_modules/thunkify
2015-12-02 18:21:44 -05:00
..
test Initial website 2015-12-02 18:21:44 -05:00
.npmignore Initial website 2015-12-02 18:21:44 -05:00
History.md Initial website 2015-12-02 18:21:44 -05:00
index.js Initial website 2015-12-02 18:21:44 -05:00
Makefile Initial website 2015-12-02 18:21:44 -05:00
package.json Initial website 2015-12-02 18:21:44 -05:00
Readme.md Initial website 2015-12-02 18:21:44 -05:00

thunkify

Turn a regular node function into one which returns a thunk, useful for generator-based flow control such as co.

Installation

$ npm install thunkify

Example

var thunkify = require('thunkify');
var fs = require('fs');

var read = thunkify(fs.readFile);

read('package.json', 'utf8')(function(err, str){
  
});

License

MIT