Skip to content

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

Notifications You must be signed in to change notification settings

panosoft/spawn-promise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published