2.1.2 • Published 10 years ago

thunkify v2.1.2

Weekly downloads
2,264,830
License
MIT
Repository
github
Last release
10 years ago

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