@imcooder/mr-base
v1.0.18
Published
数据按行分割,pipe out
Downloads
1
Maintainers
Readme
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