ranges-stream

1.0.0 • Public • Published

ranges-stream

NPM

Select multiple ranges from a readable stream

var fs = require('fs')
var ranges = require('ranges-stream')
 
fs.createReadStream('text.txt')
  .pipe(ranges([{start: 10, end: 20}, {start: 30, end: 40}]))
  .pipe(createWriteStream('selected.txt')) // selects bytes from 10 to 20 and 30 to 40, discards the rest

Readme

Keywords

Package Sidebar

Install

npm i ranges-stream

Weekly Downloads

5

Version

1.0.0

License

ISC

Last publish

Collaborators

  • finnpauls