Socket
Book a DemoInstallSign in
Socket

co-exec

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

co-exec

exec() wrapper for 'co'

latest
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

co-exec

Node core exec() wrapped to return a thunk for co.

Installation

$ npm install co-exec

Example

Do some stuff with git:

var co = require('co');
var exec = require('co-exec');

co(function *(){
  var commit = yield exec('git rev-parse HEAD');
  var commits = yield exec('git rev-list master | wc -l');
  console.log('the latest commit is %s, with a total of %s', commit.slice(0, 5), commits.trim());
});

License

MIT

Keywords

async

FAQs

Package last updated on 26 Aug 2013

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