{"_id":"iso-random-stream","_rev":"4576467","name":"iso-random-stream","description":"Random bytes stream for node and browser","dist-tags":{"latest":"2.0.2"},"maintainers":[{"name":"hugomrdias","email":"mail@hugodias.me"}],"time":{"modified":"2026-04-10T15:44:18.000Z","created":"2018-09-18T16:39:33.353Z","2.0.2":"2021-12-03T08:26:02.892Z","2.0.1":"2021-12-02T16:14:31.170Z","2.0.0":"2021-04-06T12:32:44.782Z","1.1.2":"2021-04-06T12:17:48.442Z","1.1.1":"2019-09-26T08:38:13.649Z","1.1.0":"2018-12-17T17:09:01.317Z","1.0.0":"2018-09-18T16:39:33.353Z"},"users":{},"author":{"name":"Hugo Dias","email":"hugomrdias@gmail.com","url":"hugodias.me"},"repository":{"type":"git","url":"git+https://github.com/hugomrdias/iso-random-stream.git"},"versions":{"2.0.2":{"name":"iso-random-stream","version":"2.0.2","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","typesVersions":{"*":{"*":["*","dist/*","dist/src/*"],"src/*":["*","dist/*","dist/src/*"]}},"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":"^4.1.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":"1471fdc6becf434d26d8b5d10dc405cc813c3dc2","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.2","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"shasum":"a24f77c34cfdad9d398707d522a6a0cc640ff27d","size":3518,"noattachment":false,"key":"/iso-random-stream/-/iso-random-stream-2.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/iso-random-stream/download/iso-random-stream-2.0.2.tgz"},"_npmUser":{"name":"hugomrdias","email":"hugomrdias@gmail.com"},"directories":{},"maintainers":[{"name":"hugomrdias","email":"mail@hugodias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iso-random-stream_2.0.2_1638519962738_0.08073866442474786"},"_hasShrinkwrap":false,"publish_time":1638519962892,"_cnpm_publish_time":1638519962892,"_cnpmcore_publish_time":"2021-12-16T11:27:17.932Z"},"2.0.1":{"name":"iso-random-stream","version":"2.0.1","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","typesVersions":{"*":{"*":["dist/*","dist/src/*"],"src/*":["dist/*","dist/src/*"]}},"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":"^4.1.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":"5b3f0d91ffdb5b3f595aa98bcf527b17457f4707","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.1","_nodeVersion":"14.18.1","_npmVersion":"6.14.15","dist":{"shasum":"277c0f773768411be0853a2445345e918ed8b38b","size":3434,"noattachment":false,"key":"/iso-random-stream/-/iso-random-stream-2.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/iso-random-stream/download/iso-random-stream-2.0.1.tgz"},"_npmUser":{"name":"hugomrdias","email":"hugomrdias@gmail.com"},"directories":{},"maintainers":[{"name":"hugomrdias","email":"mail@hugodias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iso-random-stream_2.0.1_1638461671023_0.02799355757890787"},"_hasShrinkwrap":false,"publish_time":1638461671170,"_cnpm_publish_time":1638461671170,"_cnpmcore_publish_time":"2021-12-16T11:27:18.142Z"},"2.0.0":{"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":{"shasum":"3f0118166d5443148bbc134345fb100002ad0f1d","size":3324,"noattachment":false,"key":"/iso-random-stream/-/iso-random-stream-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/iso-random-stream/download/iso-random-stream-2.0.0.tgz"},"_npmUser":{"name":"hugomrdias","email":"hugomrdias@gmail.com"},"directories":{},"maintainers":[{"name":"hugomrdias","email":"mail@hugodias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iso-random-stream_2.0.0_1617712364652_0.8338814707094286"},"_hasShrinkwrap":false,"publish_time":1617712364782,"_cnpm_publish_time":1617712364782,"_cnpmcore_publish_time":"2021-12-16T11:27:18.381Z"},"1.1.2":{"name":"iso-random-stream","version":"1.1.2","description":"Random bytes stream for node and browser","repository":{"type":"git","url":"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","engines":{"node":">=8"},"browser":{"./src/random.js":"./src/random.browser.js"},"scripts":{"test":"nyc tape test.js | faucet","test:browser-local":"airtap --local test.js","lint":"eslint --cache *.js src/*.js","validate":"run-p lint test","precommit":"yarn validate","version":"yarn changelog && git add changelog.md","changelog":"conventional-changelog -p angular -i changelog.md -s -r 0","cov":"yarn test && nyc report --reporter=html && hs coverage -s -o -c-1","cov:report":"nyc report --reporter=text-lcov > coverage.lcov && codecov"},"keywords":["stream","random","bytes","isomorphic","node","browser"],"dependencies":{"buffer":"^6.0.3","readable-stream":"^3.4.0"},"devDependencies":{"airtap":"^2.0.2","codecov":"^3.1.0","conventional-changelog-cli":"^2.0.5","eslint":"^4.7.1","eslint-config-halo":"^2.3.3","faucet":"^0.0.1","http-serve":"^1.0.1","husky":"^4.2.5","np":"^6.2.2","npm-run-all":"^4.1.1","nyc":"^15.0.1","tape":"^4.9.1"},"eslintConfig":{"extends":"halo/node"},"eslintIgnore":["node_modules","coverage","dist","storybook-static","typings"],"licenseText":"MIT License\n\nCopyright (c) Hugo Dias <hugomrdias@gmail.com> (hugodias.me)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","_id":"iso-random-stream@1.1.2","dist":{"shasum":"c703da2c518db573277c5678cc43c5298283d64c","size":3122,"noattachment":false,"key":"/iso-random-stream/-/iso-random-stream-1.1.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/iso-random-stream/download/iso-random-stream-1.1.2.tgz"},"_npmUser":{"name":"hugomrdias","email":"hugomrdias@gmail.com"},"directories":{},"maintainers":[{"name":"hugomrdias","email":"mail@hugodias.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iso-random-stream_1.1.2_1617711468282_0.28837200011220054"},"_hasShrinkwrap":false,"publish_time":1617711468442,"_cnpm_publish_time":1617711468442,"_cnpmcore_publish_time":"2021-12-16T11:27:18.639Z"},"1.1.1":{"name":"iso-random-stream","version":"1.1.1","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","engines":{"node":">=8"},"browser":{"./src/random.js":"./src/random.browser.js"},"scripts":{"test":"nyc tape test.js | faucet","test:browser-local":"airtap --local test.js","lint":"eslint --cache *.js src/*.js","validate":"run-p lint test","precommit":"yarn validate","version":"yarn changelog && git add changelog.md","changelog":"conventional-changelog -p angular -i changelog.md -s -r 0","cov":"yarn test && nyc report --reporter=html && hs coverage -s -o -c-1","cov:report":"nyc report --reporter=text-lcov > coverage.lcov && codecov"},"keywords":["stream","random","bytes","isomorphic","node","browser"],"dependencies":{"buffer":"^5.4.3","readable-stream":"^3.4.0"},"devDependencies":{"airtap":"^2.0.2","codecov":"^3.1.0","conventional-changelog-cli":"^2.0.5","eslint":"^4.7.1","eslint-config-halo":"^2.3.3","faucet":"^0.0.1","http-serve":"^1.0.1","husky":"^3.0.2","np":"^5.0.2","npm-run-all":"^4.1.1","nyc":"^14.1.1","tape":"^4.9.1"},"eslintConfig":{"extends":"halo/node"},"eslintIgnore":["node_modules","coverage","dist","storybook-static","typings"],"gitHead":"e4979b329d6032b8b5412eca303a41f0f57bdb08","bugs":{"url":"https://github.com/hugomrdias/iso-random-stream/issues"},"homepage":"https://github.com/hugomrdias/iso-random-stream#readme","_id":"iso-random-stream@1.1.1","_nodeVersion":"10.16.3","_npmVersion":"6.9.0","dist":{"shasum":"83824bba77fbb3480dd6b35fbb06de7f9e93e80f","size":2945,"noattachment":false,"key":"/iso-random-stream/-/iso-random-stream-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/iso-random-stream/download/iso-random-stream-1.1.1.tgz"},"maintainers":[{"name":"hugomrdias","email":"mail@hugodias.me"}],"_npmUser":{"name":"hugomrdias","email":"mail@hugodias.me"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iso-random-stream_1.1.1_1569487093513_0.345683333180296"},"_hasShrinkwrap":false,"publish_time":1569487093649,"_cnpm_publish_time":1569487093649,"_cnpmcore_publish_time":"2021-12-16T11:27:18.837Z"},"1.1.0":{"name":"iso-random-stream","version":"1.1.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","engines":{"node":">=8"},"browser":{"./src/random.js":"./src/random.browser.js"},"scripts":{"test":"nyc tape test.js | faucet","test:browser-local":"airtap --local test.js","lint":"eslint --cache *.js src/*.js","validate":"run-p lint test","precommit":"yarn validate","version":"yarn changelog && git add changelog.md","changelog":"conventional-changelog -p angular -i changelog.md -s -r 0","cov":"yarn test && nyc report --reporter=html && hs coverage -s -o -c-1","cov:report":"nyc report --reporter=text-lcov > coverage.lcov && codecov"},"keywords":["stream","random","bytes","isomorphic","node","browser"],"dependencies":{},"devDependencies":{"airtap":"^0.1.0","tape":"^4.9.1","faucet":"^0.0.1","codecov":"^3.1.0","conventional-changelog-cli":"^2.0.5","eslint":"^4.7.1","eslint-config-halo":"^2.3.3","http-serve":"^1.0.1","husky":"^0.14.3","np":"^3.0.4","npm-run-all":"^4.1.1","nyc":"^13.0.1"},"eslintConfig":{"extends":"halo/node"},"eslintIgnore":["node_modules","coverage","dist","storybook-static","typings"],"gitHead":"e1eec976b272493eca024ef45d4ec687bfe999f2","bugs":{"url":"https://github.com/hugomrdias/iso-random-stream/issues"},"homepage":"https://github.com/hugomrdias/iso-random-stream#readme","_id":"iso-random-stream@1.1.0","_npmVersion":"6.5.0","_nodeVersion":"10.13.0","_npmUser":{"name":"hugomrdias","email":"mail@hugodias.me"},"dist":{"shasum":"c1dc1bb43dd8da6524df9cbc6253b010806585c8","size":2864,"noattachment":false,"key":"/iso-random-stream/-/iso-random-stream-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/iso-random-stream/download/iso-random-stream-1.1.0.tgz"},"maintainers":[{"name":"hugomrdias","email":"mail@hugodias.me"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iso-random-stream_1.1.0_1545066541161_0.7638167765484614"},"_hasShrinkwrap":false,"publish_time":1545066541317,"_cnpm_publish_time":1545066541317,"_cnpmcore_publish_time":"2021-12-16T11:27:19.136Z"},"1.0.0":{"name":"iso-random-stream","version":"1.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","engines":{"node":">=8"},"browser":{"./src/random.js":"./src/random.browser.js"},"scripts":{"test":"nyc tape test.js | faucet","test:browser-local":"airtap --local test.js","lint":"eslint --cache *.js src/*.js","validate":"run-p lint test","precommit":"yarn validate","version":"yarn changelog && git add CHANGELOG.md","changelog":"conventional-changelog -p angular -i CHANGELOG.md -s -r 0","cov":"yarn test && nyc report --reporter=html && hs coverage -s -o -c-1","cov:report":"nyc report --reporter=text-lcov > coverage.lcov && codecov"},"keywords":["stream","random","bytes","isomorphic","node","browser"],"dependencies":{},"devDependencies":{"airtap":"^0.1.0","tape":"^4.9.1","faucet":"^0.0.1","codecov":"^3.1.0","conventional-changelog-cli":"^2.0.5","eslint":"^4.7.1","eslint-config-halo":"^2.3.3","http-serve":"^1.0.1","husky":"^0.14.3","np":"^3.0.4","npm-run-all":"^4.1.1","nyc":"^13.0.1"},"eslintConfig":{"extends":"halo/node"},"eslintIgnore":["node_modules","coverage","dist","storybook-static","typings"],"gitHead":"976f1f055f838fbae30dec0a0e4e70b518ef9fa6","bugs":{"url":"https://github.com/hugomrdias/iso-random-stream/issues"},"homepage":"https://github.com/hugomrdias/iso-random-stream#readme","_id":"iso-random-stream@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.10.0","_npmUser":{"name":"hugomrdias","email":"mail@hugodias.me"},"dist":{"shasum":"96f302a7c86938da07bfacb596353124ec617834","size":2753,"noattachment":false,"key":"/iso-random-stream/-/iso-random-stream-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/iso-random-stream/download/iso-random-stream-1.0.0.tgz"},"maintainers":[{"name":"hugomrdias","email":"mail@hugodias.me"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/iso-random-stream_1.0.0_1537288773260_0.6648347375889643"},"_hasShrinkwrap":false,"publish_time":1537288773353,"_cnpm_publish_time":1537288773353,"_cnpmcore_publish_time":"2021-12-16T11:27:19.328Z"}},"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","_attachments":{},"homepage":"https://github.com/hugomrdias/iso-random-stream#readme","bugs":{"url":"https://github.com/hugomrdias/iso-random-stream/issues"},"license":"MIT"}