strom/samples/duplex.js

7 lines
218 B
JavaScript
Raw Normal View History

2018-12-04 06:30:38 +00:00
const Mhysa = require("mhysa");
const catProcess = require("child_process").exec("grep -o ab");
2018-12-04 06:30:38 +00:00
Mhysa.fromArray(["a", "b", "c"])
.pipe(Mhysa.duplex(catProcess.stdin, catProcess.stdout))
.pipe(process.stdout);