mr-base
split stdio as test line
Install
npm i @imcooder/mr-base -S
Usage
parse.js
const MRBase = require('mr-base');
let mr = new MRBase();
let lineNumber = 0;
mr.on('line', line => {
console.log(line);
lineNumber ++;
});
mr.on('end', () => {
console.log(lineNumber);
});
use:
cat test.log | node parse.js
Example
License
The MIT License