Skip to content

kesla/reservoir-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#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

About

A streaming interface to do reservoir sampling

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published