spawn-promise

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

MIT 11 个版本
安装
npm install spawn-promise
yarn add spawn-promise
pnpm add spawn-promise
bun add spawn-promise
README

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.
版本列表
0.1.8 2018-03-08
0.1.7 2015-12-17
0.1.6 2015-11-10
0.1.5 2015-10-02
0.1.4 2015-08-17
0.1.3 2015-08-10
0.1.2 2015-08-06
0.1.1 2015-08-06
0.1.0 2015-07-29
0.0.1 2015-07-27
0.0.0 2015-07-27