1.0.1 • Published 6 years ago
async-iterators-kit v1.0.1
node-async-iterators-kit
Currently, the package provides a set of async iterators for handling readline, streams, child process stdout and timeouts:
See example:
const node = cp.spawn('node', ['-p', '2+2'], { stdio: 'pipe' });
const iterator = new ChildProcessStdioAsyncIterator(node, 'stdout');
for await (const line of iterator) {
lines.push(line); // [4]
break; // sends SIGTERM to the process if it has not exited yet
}
1.0.1
6 years ago