huanggang 03a863fb53 add node_modules 8 年之前
..
test 03a863fb53 add node_modules 8 年之前
.npmignore 03a863fb53 add node_modules 8 年之前
History.md 03a863fb53 add node_modules 8 年之前
Makefile 03a863fb53 add node_modules 8 年之前
Readme.md 03a863fb53 add node_modules 8 年之前
index.js 03a863fb53 add node_modules 8 年之前
package.json 03a863fb53 add node_modules 8 年之前

Readme.md

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