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

6 Versions

  • 2.1.2                                ...           5 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                                ...           6 years ago
Maintainers (1)
Downloads
Today 384
This Week 23,909
This Month 184,903
Last Day 11,339
Last Week 65,719
Last Month 303,907
Dependencies (0)
None
Dev Dependencies (2)
Dependents (414)

Copyright 2014 - 2016 © taobao.org |