thunkify
Turn callbacks, arrays, generators, generator functions, and promises into a thunk
Last updated 10 years ago by tjholowaychuk .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install thunkify 
SYNC missed versions from official npm registry.

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

Current Tags

  • 2.1.2                                ...           latest (10 years ago)

6 Versions

  • 2.1.2                                ...           10 years ago
  • 2.1.1                                ...           11 years ago
  • 2.1.0                                ...           11 years ago
  • 2.0.0                                ...           11 years ago
  • 1.0.0                                ...           11 years ago
  • 0.0.1                                ...           11 years ago
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE