Stream line wrapper
Wrap each lines of a stream with a prefix, suffix or a custom function.
Usage
var childProcess = ;var LineWrapper = ;var ls = childProcess; var lineWrapper = prefix: '-- ' ;lsstdout; // -- file1.js// -- file2.js// -- file3.js
Options
prefix
Prefix each lines with a string.
var lineWrapper = prefix: '-- ' ;lsstdout; // -- file1.js
suffix
Suffix each lines with a string.
var lineWrapper = suffix: ' @' ;lsstdout; // file1.js @
wrapper
Use a function to wrapper each lines.
var lineWrapper = wrapper: countChars ; /** * Prefix each lines with char count. * * @param * @param */ { return ;} lsstdout; // (8) file1.js
License
MIT