@cjser/random-bytes-readable-stream
v3.0.0-cjser.2
Published
Creates a readable stream producing cryptographically strong pseudo-random data using `crypto.randomBytes()`
Maintainers
Readme
random-bytes-readable-stream
Creates a readable stream producing cryptographically strong pseudo-random data using
crypto.randomBytes()
It's like a cross-platform fs.createReadStream('/dev/urandom').
Install
$ npm install random-bytes-readable-streamUsage
import randomBytesReadableStream from 'random-bytes-readable-stream';
randomBytesReadableStream({size: 10}).pipe(process.stdout);API
randomBytesReadableStream(options?)
Returns a stream.Readable.
By default, it produces infinite data.
options
Type: Object
size
Type: number
Default: Infinity
The total size to be produced by the stream in bytes.
cjser
This package is a CommonJS-compatible build generated by cjser for projects that still need require() support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.
Original repository: https://github.com/sindresorhus/random-bytes-readable-stream
