stdio-duplex
Factory function for duplex streams made from process.std{in,out}.
Usage
from doc/examples/line-lengths.js:
var stdio = lines: true ;stdio;
Options
The factory function takes an optional options object which supports these settings:
end
: (bool) Whether to end stdout when stdin ends. Default:false
- NB: Trying to
.end()
the original ("real") stdout will most probably fail withError: process.stdout cannot be closed.
- NB: Trying to
err
: (bool) Send output to stderr instead of stdout. Default:false
lines
: (bool) Split stdin into lines. Default:false
License
ISC