thunkify
Turn callbacks, arrays, generators, generator functions, and promises into a thunk
Last updated 6 years ago by tjholowaychuk .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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 (6 years ago)

6 Versions

  • 2.1.2                                ...           6 years ago
  • 2.1.1                                ...           6 years ago
  • 2.1.0                                ...           6 years ago
  • 2.0.0                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
Maintainers (1)
Downloads
Today 12,271
This Week 50,388
This Month 125,896
Last Day 12,449
Last Week 71,183
Last Month 300,357
Dependencies (0)
None
Dev Dependencies (2)
Dependents (422)

Copyright 2014 - 2017 © taobao.org |