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.
npm install line-length-stream
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.
If you have a question, found a bug or want to propose a feature, have a look at the issues page.