truncating-stream

Transform stream that truncates

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
truncating-stream
301.0.28 years ago10 years agoMinified + gzip package size for truncating-stream in KB

Readme

truncating-stream
A Node v0.10 Transform stream that truncates its input at a specified limit.
Prompted by this node.js mailing list question

USAGE

var t = new Trunc ({ limit : someNumber })

readable . pipe (t)

var seen = 0
t . on ('data', function (chunk) {
  seen += chunk . length // will never go past someNumber
})