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                                ...           7 years ago
Maintainers (1)
Downloads
Today 2,920
This Week 80,656
This Month 134,064
Last Day 5,716
Last Week 82,723
Last Month 352,344
Dependencies (0)
None
Dev Dependencies (2)
Dependents (428)

Copyright 2014 - 2016 © taobao.org |