Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

command

Package Overview
Dependencies
2
Maintainers
1
Versions
11
Issues
File Explorer

Advanced tools

command

A chainable, promise-based utility for running commands with child_process.spawn

    0.0.5latest
    GitHub

Version published
Maintainers
1
Weekly downloads
274
increased by17.6%

Weekly downloads

Readme

Source

command

A Node.js chainable, promise-based utility for running commands with child_process.spawn

Install

$ npm install command

Usage

var command = require('command'); command.open('/some/directory/path') .on('stdout', command.writeTo(process.stdout)) .on('stderr', command.writeTo(process.stderr)) .chdir('..') .exec('ls') .then(function() { var stdout = this.lastOutput.stdout; if (! stdout.trim().length) { console.warn('No files found!'); } });

Keywords

FAQs

Last updated on 09 Jun 2014

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc