New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

co-common

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

co-common

Simple wrapper to co and relate library, such as co-fs, co-wait, thunkify.. for easy use

latest
npmnpm
Version
0.1.0
Version published
Weekly downloads
1
-75%
Maintainers
1
Weekly downloads
 
Created
Source

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.

Keywords

co

FAQs

Package last updated on 11 Jan 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts