iso-random-stream
Random bytes stream for node and browser
Last updated 5 years ago by hugomrdias .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install iso-random-stream 
SYNC missed versions from official npm registry.

iso-random-stream NPM Version NPM Downloads NPM License tests codecov

Random bytes stream for node and browser. Uses crypto.randomBytes(size[, callback]) in node and Crypto.getRandomValues() in the browser. We use Buffer to keep the interfaces and returns values consistent, so make sure your bundler includes buffer in the browser.

Install

$ npm install iso-random-stream

Usage

const { randomStream } = require('iso-random-stream')

randomStream('100').pipe(process.stdout)

API

randomStream(size)

Returns a stream.Readable. By default, it produces infinite data.

size

Type: number Default: Infinity

Number of random bytes to produce.

License

MIT © Hugo Dias

Current Tags

  • 2.0.2                                ...           latest (5 years ago)

7 Versions

  • 2.0.2                                ...           5 years ago
  • 2.0.1                                ...           5 years ago
  • 2.0.0                                ...           6 years ago
  • 1.1.2                                ...           6 years ago
  • 1.1.1                                ...           7 years ago
  • 1.1.0                                ...           8 years ago
  • 1.0.0                                ...           8 years ago
Maintainers (1)
Downloads
Total 49
Today 0
This Week 6
This Month 27
Last Day 1
Last Week 6
Last Month 15
Dependencies (2)
Dev Dependencies (9)

© 2010 - cnpmjs.org x YWFE | Home | YWFE