streamcutter

1.0.0 • Public • Published

NPM version NPM downloads Dependencies

NPM info

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
  • transformerStreamOptions

Install

npm install --save streamcutter

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i streamcutter

Weekly Downloads

2

Version

1.0.0

License

MIT

Last publish

Collaborators

  • timeforaninja