line-numbers-stream
v1.1.0
Published
Add line numbers to a stream of text
Downloads
6
Maintainers
Readme
line-numbers-stream
Add line numbers to a stream of text
Installation
$ npm install --save line-numbers-stream
Usage
const fs = require('fs');
const source = fs.createReadStream('exampleText.txt');
const addLineNumbers = require('line-numbers-stream');
source.pipe(addLineNumbers).pipe(process.stdout);
// 1: First line
// 2: and the second line.
// 3: ... and so on.
License
MIT © Even Brenna