Turn a regular node function into one which returns a thunk
Switch branches/tags
Clone or download
Latest commit 286835e Sep 25, 2018
Permalink
Failed to load latest commit information.
test remove memoization Apr 17, 2014
.gitignore Initial commit Oct 14, 2013
History.md Release 2.1.2 Jun 2, 2014
LICENSE Create LICENSE Sep 25, 2018
Makefile Initial commit Oct 14, 2013
Readme.md Update Readme.md Feb 20, 2014
component.json fix(npm|component): rename repo name Dec 13, 2014
index.js refactor Jun 2, 2014
package.json fix(npm|component): rename repo name Dec 13, 2014

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