Simple wrapper to co and relate library, such as co-fs, co-wait, thunkify.. for easy use
Simple wrapper to co and relate library: co-fs, co-wait, thunkify, thunker, defer.
$ npm install co-common
Read a file
var co = require'co-common';var fs = cofs;covar content = yield fsreadFile'./filename' 'utf8';console.logcontent;;
Relate library can be referred as co's attribute.
- 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"
co relate library visite here.