{"name":"iso-random-stream","version":"2.0.0","description":"Random bytes stream for node and browser","repository":{"type":"git","url":"git+https://github.com/hugomrdias/iso-random-stream.git"},"author":{"name":"Hugo Dias","email":"hugomrdias@gmail.com","url":"hugodias.me"},"license":"MIT","main":"src/index.js","types":"dist/src/index.d.ts","engines":{"node":">=10"},"browser":{"./src/random.js":"./src/random.browser.js"},"scripts":{"prepare":"tsc","check":"yarn lint && yarn test && yarn test:browser","test":"c8 -r json --report-dir .nyc_output --clean tape test.js","test:browser":"playwright-test test.js --runner tape --cov","lint":"eslint **/*.js && prettier --check **/*.{js,yml,json} --ignore-path .gitignore && tsc","cov":"yarn test && yarn test:browser && nyc report --reporter=html && sirv coverage"},"keywords":["stream","random","bytes","isomorphic","node","browser"],"dependencies":{"events":"^3.3.0","readable-stream":"^3.4.0"},"devDependencies":{"@types/readable-stream":"^2.3.9","@types/tape":"^4.13.0","c8":"^7.7.0","hd-scripts":"^0.1.1","nyc":"^15.0.1","playwright-test":"^3.0.0","sirv-cli":"^1.0.11","tap-spec":"^5.0.0","tape":"^5.2.2"},"simple-git-hooks":{"pre-commit":"npx lint-staged"},"lint-staged":{"*.{js,ts,md,yml,json}":"prettier --write","*.js":"eslint --fix"},"eslintConfig":{"extends":"./node_modules/hd-scripts/eslint/index.js"},"eslintIgnore":["dist"],"prettier":"hd-scripts/prettier.config.js","gitHead":"370dfd5cf9ec0bb4da9ed6a242dafef00a448bc4","bugs":{"url":"https://github.com/hugomrdias/iso-random-stream/issues"},"homepage":"https://github.com/hugomrdias/iso-random-stream#readme","_id":"iso-random-stream@2.0.0","_nodeVersion":"14.16.0","_npmVersion":"6.14.11","dist":{"integrity":"sha512-lGuIu104KfBV9ubYTSaE3GeAr6I69iggXxBHbTBc5u/XKlwlWl0LCytnkIZissaKqvxablwRD9B3ktVnmIUnEg==","shasum":"3f0118166d5443148bbc134345fb100002ad0f1d","tarball":"http://registry-npm.ywwl.com/iso-random-stream/download/iso-random-stream-2.0.0.tgz","fileCount":13,"unpackedSize":7317,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgbFTtCRA9TVsSAnZWagAAcxcP/23GoE/XNNVC6IBnUY5F\nVC42SgsZonqDh0Jl9Llrv9nz7mbSMCmnsaGCBx9TW9sPFr9UDKynbIndkKg8\nAH/62CaEP3vDSJtp9mr1G4cXWMOb6Cjurf4OhJVYgOmCBsrXrzBY1lckAW6T\nWr0ln7jK4M9iyKbBuPHuh5DBtHK8u3VJOKUEoDmS8rJ78Jol+nYnpgcnrHr2\nf2aJvRg1Ouw+etoNPVu5wVu38wv5XQUeJYno2Jf6jqkfjdYK1rWomf1Mo5h5\ni85JF0MrwGbfQtUhtbmzpW5/Ld9/R8v/ia7HM9W0FCepACigQ5e7NSe5mSSO\nkvv9a3/nb8DWinJtrQcheu/FrikhC2SEcwFFH3XmsQatblWUwf3bi3+Zdsw9\n0wWgRTWybeBso1H8e+0U9NRTCseUtPe5VwBVBIt8iwqX+w0Yf6g0M6LOF5ka\nTHHepzBnUidq2nNgnBPsIGoRL9i0xi71XmIvUYCr3t/5GpZWE4X5Bojy8tLE\nxrgfDhMQj6VMYNjG2bcIDIfCZugcL8VyqKLEDSTbNg9Fg837DEw8bDgNQWU3\ndXrRxh7Zg5OAkZBaTYVDW9u9r8GiorfWY/lsq7LUSfjXkLzeX4gRoNMMjsqu\nJOsLFmtG+XNg85LXe97JSvTquC5dxIGTcfJTB8zVTzS+VGK1SlGsRbWL5ytl\n3+gz\r\n=tzke\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBRgoTnB05MqUC/bP7nouag2R5oEUUX4RvlPqugW/kjQIhAJJqXdDU8dE06eCgY3w/wYajcinTta4Nmf8RuDKH67AX"}],"size":3324,"noattachment":false,"key":"/iso-random-stream/-/iso-random-stream-2.0.0.tgz"},"_npmUser":{"name":"hugomrdias","email":"hugomrdias@gmail.com"},"directories":{},"maintainers":[{"name":"hugomrdias","email":"hugomrdias@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iso-random-stream_2.0.0_1617712364652_0.8338814707094286"},"_hasShrinkwrap":false,"readme":"# iso-random-stream [![NPM Version](https://img.shields.io/npm/v/iso-random-stream.svg)](https://www.npmjs.com/package/iso-random-stream) [![NPM Downloads](https://img.shields.io/npm/dt/iso-random-stream.svg)](https://www.npmjs.com/package/iso-random-stream) [![NPM License](https://img.shields.io/npm/l/iso-random-stream.svg)](https://www.npmjs.com/package/iso-random-stream) [![tests](https://github.com/hugomrdias/iso-random-stream/actions/workflows/main.yml/badge.svg)](https://github.com/hugomrdias/iso-random-stream/actions/workflows/main.yml) [![codecov](https://codecov.io/gh/hugomrdias/iso-random-stream/badge.svg?branch=master)](https://codecov.io/gh/hugomrdias/iso-random-stream?branch=master)\n\n> Random bytes stream for node and browser. Uses [crypto.randomBytes(size[, callback])](https://nodejs.org/api/crypto.html#crypto_crypto_randombytes_size_callback) in node and [Crypto.getRandomValues()](https://developer.mozilla.org/en-US/docs/Web/API/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.\n\n## Install\n\n```\n$ npm install iso-random-stream\n```\n\n## Usage\n\n```js\nconst { randomStream } = require('iso-random-stream')\n\nrandomStream('100').pipe(process.stdout)\n```\n\n## API\n\n### randomStream(size)\n\nReturns a [`stream.Readable`](https://nodejs.org/api/stream.html#stream_readable_streams). By default, it produces infinite data.\n\n#### size\n\nType: `number`\nDefault: `Infinity`\n\nNumber of random bytes to produce.\n\n## License\n\nMIT © [Hugo Dias](http://hugodias.me)\n","publish_time":1617712364782,"_cnpm_publish_time":1617712364782,"dist-tags":{"latest":"2.0.2"}}