cp-pipe
Pipe stdout and stderr from child processes without typing as much code.
install
npm install cp-pipe
example
Require the module and make some processes:
const cpPipe = const a = const b = const c =
cpPipe // vs astdoutbstdoutcstdout astderrbstderrcstderr
cpPipe // vs astdoutbstdout
cpPipe astderrbstderrcstderr
API
cpPipe.chainToProcess(processes)
processes: []
Array of child processes
Pipes the stdout of a prior process from processes
into the stdout of the next process, chaining the stdouts/stdins together, pipes the stdout of the last process to process.stdout
, and pipes the stderrs of all processes
to process.stderr
.
cpPipe.outIn(processes)
processes: []
Array of child processes
Pipes the stdout of a prior process from processes
into the stdout of the next process, chaining the stdouts/stdins together.
cpPipe.err(processes, destProcess)
Pipes the stderrs of all processes
to destProcess.stderr
.