0.1.1 • Published 8 years ago

line-length-stream v0.1.1

Weekly downloads
3
License
ISC
Repository
github
Last release
8 years ago

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.

build status dependency status dev dependency status ISC-licensed

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.