Have ideas to improve npm?Join in the discussion! »

    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

    Install

    npm i thunkify

    DownloadsWeekly Downloads

    1,427,693

    Version

    2.1.2

    License

    MIT

    Last publish

    Collaborators

    • avatar