Skip to content
Return random chunks from a stream
JavaScript
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
test
.gitignore
.travis.yml
README.md
index.js
package.json

README.md

rand-stream

Filter a stream into random chunks.

Build Status
NPM

Example

var rand   = require('rand')
  , split  = require('split')
  , fs     = require('fs');

// pipe a random collection of lines to stdout
fs.createReadStream(somefile)
  .pipe(split())
  .pipe(rand(2))
  .pipe(process.stdout)

  // => line 8
  // => line 3

install

With npm do:

npm install rand-stream
Something went wrong with that request. Please try again.