head-tail-stream
Stream to only output the first or last lines of a stream,
similarly as the head
and tail
CLI commands.
Installation
npm install head-tail-stream
Usage
var head = ; data;/*line 1 of 20line 2 of 20line 3 of 20*/ data;/*line 19 of 20line 20 of 20*/ // both a head and a tail. same as `head(3, 2)`data;/*line 1 of 20line 2 of 20line 3 of 20...line 19 of 20line 20 of 20*/ // head and tail with a custom message in betweenvar headStream = ;data;/*line 1 of 20line 2 of 20line 3 of 20## long output was hidden## run with different options to see a detailed outputline 19 of 20line 20 of 20*/
License
MIT license - http://www.opensource.org/licenses/mit-license.php