strom/samples/duplex.js
2018-12-04 01:30:38 -05:00

6 lines
217 B
JavaScript

const Mhysa = require("mhysa");
const catProcess = require("child_process").exec("grep -o ab");
Mhysa.fromArray(["a", "b", "c"])
.pipe(Mhysa.duplex(catProcess.stdin, catProcess.stdout))
.pipe(process.stdout);