truncating-stream

1.0.2 • Public • Published

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
})

Package Sidebar

Install

npm i truncating-stream

Weekly Downloads

100

Version

1.0.2

License

ISC

Last publish

Collaborators

  • isaacs