Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A streaming interface to do reservoir sampling
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
.travis.yml
README.md
package.json
reservoir-stream.js

README.md

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
Something went wrong with that request. Please try again.