co-common
Simple wrapper to co and relate library, such as co-fs, co-wait, thunkify.. for easy use
Last updated 4 years ago by pana .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install co-common 
SYNC missed versions from official npm registry.

co-common

Simple wrapper to co and relate library: co-fs, co-wait, thunkify, thunker, defer.

Installation

$ npm install co-common

Example

Read a file

var co = require('co-common');
var fs = co.fs;

co(function* (){
    var content = yield fs.readFile('./filename', 'utf8');
    console.log(content);
})();

Include Library

Relate library can be referred as co's attribute.

  • co
  • thunkify -- Turn a regular node function into one which returns a thunk
  • thunker -- Thunker takes module and returns Thunked API
  • co-wait -- setTimeout generator style
  • defer -- setImmediate and stuff with generators
  • co-fs -- nodejs core fs module thunk wrappers for "co"

More

For more co relate library visite here.

Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (6)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |