spawn-promise
Spawns a process and makes it simple to pipe data in and get data out.
Last updated 2 years ago by panosoft .
MIT · Repository · Bugs · Original npm · Tarball
$ cnpm install spawn-promise 
SYNC missed versions from official npm registry.

spawn-promise

Spawns a process and makes it simple to pipe data in and get data out.

npm version npm license Travis David npm downloads

Installation

npm install spawn-promise

Usage

var spawn = require(spawn-promise);

spawn('grep', ['H'], 'Hello').then(function (buffer) {
  console.log(buffer.toString()); // Hello
});

API


spawn ( command [, args] [, input] )

Spawns a child process with the given command, writes the input value to stdin, and returns a Promise that is fulfilled with the concatenated stdout buffer.

Arguments

  • command - The command to run.
  • args - An array of arguments to run the command with.
  • input - The value to write to stdin.
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
  • co ^4.6.0
Dev Dependencies (3)

Copyright 2014 - 2017 © taobao.org |