line-length-stream
v0.1.1
Published
Transform stream that returns the length of each line.
Downloads
6
Maintainers
Readme
line-length-stream
A transform stream that returns the length of each line and the amount of indentation.
const lineLengthStream = require('line-length-stream')
let s = lineLengthStream({tabSize: 4})
s.on('data', console.log)
s.end([
'\tfoo',
'',
' bar baz'
].join('\n'))
// `[4, 3]`, `[0, 0]` and `[2, 7]` will be logged.
Installing
npm install line-length-stream
Usage
lineLengthStream
takes accepts an optional options
argument. It returns a transform stream. options
can have the following properties.
tabSize
: The number of chars that'\t'
stands for.
Contributing
If you have a question, found a bug or want to propose a feature, have a look at the issues page.