thunker

0.0.4 • Public • Published

Thunker##

Thunker takes module and returns Thunked API.

Warning! It is highly experimental library.####

To install run:

npm install thunker

Reqired node > v0.11.7####

var fs = require('fs')
  , thunker = require('thunker');
 
fs = thunker(fs); // Thunked API of fs
// or tfs = thunker(fs); to save access to fs props

Thunks needed for Co (https://github.com/visionmedia/co) library. If you use co, you simply wrap module by thunker:

var fs = require('fs')
  , co = require('co')
  , thunker = require('thunker');
 
fs = thunker(fs);
 
co(function* () {
  var fileData = yield fs.readFile(__filename, {encoding: 'utf8'});
  console.log(fileData);
});
 

Runing tests:###

  1. Install dev dependencies npm i --dev
  2. Run command make test

References###

Co library

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.4
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.4
    1
  • 0.0.3
    1
  • 0.0.2
    1
  • 0.0.1
    1

Package Sidebar

Install

npm i thunker

Weekly Downloads

4

Version

0.0.4

License

none

Last publish

Collaborators

  • leukhin