0.1.0 • Published 6 years ago
cp-async-stream v0.1.0
cp-async-stream
Gives you an async iterator of a child process's stdout/stderr streams.
Install
npm i cp-async-stream
Usage
const { spawn } = require('child_process');
const cpStream = require('cp-async-stream');
const cp = spawn(...)
for await (const {stdout, stderr} of cpStream(cp)) {
stderr && console.error(stderr)
stdout && console.log(stdout)
}
0.1.0
6 years ago