thunkify
Turn callbacks, arrays, generators, generator functions, and promises into a thunk
Last updated 4 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 (4 years ago)

6 Versions

  • 2.1.2                                ...           4 years ago
  • 2.1.1                                ...           5 years ago
  • 2.1.0                                ...           5 years ago
  • 2.0.0                                ...           5 years ago
  • 1.0.0                                ...           5 years ago
  • 0.0.1                                ...           5 years ago
Maintainers (1)
Downloads
Today 7,253
This Week 43,713
This Month 104,874
Last Day 9,259
Last Week 48,886
Last Month 154,051
Dependencies (0)
None
Dev Dependencies (2)
Dependents (403)

Copyright 2014 - 2017 © taobao.org |