mirror of
https://github.com/Instadapp/Swap-Aggregator-Subgraph.git
synced 2024-07-29 21:57:12 +00:00
|
||
---|---|---|
.. | ||
node_modules/buffer | ||
src | ||
CHANGELOG.md | ||
license | ||
package.json | ||
readme.md |
iso-random-stream

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