reservoir-stream

0.0.2 • Public • Published

reservoir-streambuild status

A streaming interface to do reservoir sampling by using the great reservoir module.

installation

npm install reservoir-stream

demo/usage

// use a reservoir size of 3
var stream = require('reservoir-stream')(3)
 
var inputStream.pipe(stream).pipe(outputStream)
// 3 random elements from the inputStream will be piped to the outputStream
 

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.2
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.2
    0
  • 0.0.1
    0

Package Sidebar

Install

npm i reservoir-stream

Weekly Downloads

0

Version

0.0.2

License

MIT

Last publish

Collaborators

  • kesla