Turn a regular node function into one which returns a thunk
JavaScript Makefile
Latest commit 0bd83e2 Dec 14, 2014 @tj Merge pull request #19 from a8m/master
fix(npm|component): rename repo name
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
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