0.0.2 • Published 11 years ago

reservoir-stream v0.0.2

Weekly downloads
4
License
-
Repository
github
Last release
11 years ago

#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
0.0.2

11 years ago

0.0.1

11 years ago