0.0.4 • Published 12 years ago

thunker v0.0.4

Weekly downloads
2
License
-
Repository
github
Last release
12 years ago

##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

0.0.4

12 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago