limit-size-stream
Limit the size of a stream
Install
$ npm install --save limit-size-stream
Usage
const fs = ;const getStream = ;const limitSizeStream = ;const stream = fs; ;
API
limitSizeStream(stream, limit)
stream
Type: Stream
Stream to limit.
limit
Type: number
Maximum length of the returned buffer or string.
limitSizeStream.obj(stream, limit)
stream
Type: Stream
Stream to limit.
limit
Type: number
Maximum number of items to return.
License
MIT © Kevin Martensson