thunkify

2.1.2 • Public • Published

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

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 2.1.2
    336,782
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 2.1.2
    336,782
  • 2.1.1
    4
  • 2.1.0
    2
  • 2.0.0
    1
  • 1.0.0
    2
  • 0.0.1
    3,043

Package Sidebar

Install

npm i thunkify

Weekly Downloads

339,834

Version

2.1.2

License

MIT

Last publish

Collaborators

  • tjholowaychuk