1.0.0 • Published 7 years ago
streamcutter v1.0.0
node-streamcutter
cut a streams start, end and length
Usage
remove the first and last 10 bytes from a stream
const streamCutter = require('streamcutter');
const fs = require('fs');
const noStartNoEnd = new streamCutter({start: 10, end: 10});
<stream>.pipe(noStartNoEnd);
noStartNoEnd.pipe(fs.createWriteStream('./cutFile'));
API
new streamCutter([options, transformerStreamOptions])
- options typeof Object
- options.end
- typeof number
- how many bytes to trim from the end
- options.start
- typeof number
- how many bytes to trim from the start
- options.length
- typeof number
- how many bytes it should be long
- options.debug
- typeof boolean
- enable debug logs
- options.end
- transformerStreamOptions
Install
npm install --save streamcutter
License
MIT
1.0.0
7 years ago