{"_id":"get-random-values","_rev":"2764538","name":"get-random-values","description":"`window.crypto.getRandomValues` with fallback to Node.js crypto","dist-tags":{"latest":"1.2.2"},"maintainers":[{"name":"kenan","email":"kenan@kenany.me"}],"time":{"modified":"2022-03-23T06:49:48.000Z","created":"2014-08-07T04:06:26.163Z","1.2.2":"2020-08-25T20:42:40.534Z","1.2.1":"2020-08-25T20:28:50.550Z","1.2.0":"2016-01-08T15:11:43.550Z","1.1.1":"2014-09-18T16:17:07.620Z","1.1.0":"2014-09-05T19:06:09.592Z","1.0.1":"2014-08-07T16:06:44.127Z","1.0.0":"2014-08-07T04:06:26.163Z"},"users":{},"author":{"name":"Kenan Yildirim","email":"kenan@kenany.me","url":"http://kenany.me/"},"repository":{"type":"git","url":"git+https://github.com/KenanY/get-random-values.git"},"versions":{"1.2.2":{"name":"get-random-values","version":"1.2.2","description":"`window.crypto.getRandomValues` with fallback to Node.js crypto","keywords":["crypto"],"repository":{"type":"git","url":"git+https://github.com/KenanY/get-random-values.git"},"license":"MIT","author":{"name":"Kenan Yildirim","email":"kenan@kenany.me","url":"http://kenany.me/"},"main":"index.js","directories":{"test":"test"},"engines":{"node":"10 || 12 || >=14"},"scripts":{"release":"semantic-release","test":"tape test/*.js"},"dependencies":{"global":"^4.4.0"},"devDependencies":{"@kenan/renovate-config":"1.4.0","@semantic-release/changelog":"5.0.1","@semantic-release/git":"9.0.0","conventional-changelog-conventionalcommits":"4.4.0","is-browser":"2.1.0","lodash.foreach":"4.5.0","lodash.isfunction":"3.0.9","semantic-release":"17.1.1","tape":"5.0.1"},"browser":{"crypto":false},"gitHead":"498a3f367e9d3cc702df1c6a7bfe536654d58b62","bugs":{"url":"https://github.com/KenanY/get-random-values/issues"},"homepage":"https://github.com/KenanY/get-random-values#readme","_id":"get-random-values@1.2.2","_nodeVersion":"12.18.3","_npmVersion":"6.14.8","dist":{"shasum":"f1d944d0025433d53a2bd9941b9e975d98a2f7ff","size":2364,"noattachment":false,"key":"/get-random-values/-/get-random-values-1.2.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-random-values/download/get-random-values-1.2.2.tgz"},"maintainers":[{"name":"kenan","email":"kenan@kenany.me"}],"_npmUser":{"name":"kenan","email":"kenan@kenany.me"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-random-values_1.2.2_1598388160137_0.16078375969291958"},"_hasShrinkwrap":false,"publish_time":1598388160534,"_cnpm_publish_time":1598388160534,"_cnpmcore_publish_time":"2021-12-16T10:41:35.449Z"},"1.2.1":{"name":"get-random-values","version":"1.2.1","description":"`window.crypto.getRandomValues` with fallback to Node.js crypto","keywords":["crypto"],"repository":{"type":"git","url":"git+https://github.com/KenanY/get-random-values.git"},"license":"MIT","author":{"name":"Kenan Yildirim","email":"kenan@kenany.me","url":"http://kenany.me/"},"main":"index.js","directories":{"test":"test"},"engines":{"node":"10 || 12 || >=14"},"scripts":{"release":"semantic-release","test":"tape test/*.js"},"dependencies":{"global":"^4.4.0"},"devDependencies":{"@kenan/renovate-config":"1.4.0","@semantic-release/changelog":"5.0.1","@semantic-release/git":"9.0.0","conventional-changelog-conventionalcommits":"4.4.0","is-browser":"2.1.0","lodash.foreach":"4.5.0","lodash.isfunction":"3.0.9","semantic-release":"17.1.1","tape":"5.0.1"},"browser":{"crypto":false},"gitHead":"b71958726279a510ff13349e1dd69ae9b917267e","bugs":{"url":"https://github.com/KenanY/get-random-values/issues"},"homepage":"https://github.com/KenanY/get-random-values#readme","_id":"get-random-values@1.2.1","_nodeVersion":"12.18.3","_npmVersion":"6.14.8","dist":{"shasum":"35f4841090cba8efc070973031eb934cb722c89f","size":2299,"noattachment":false,"key":"/get-random-values/-/get-random-values-1.2.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-random-values/download/get-random-values-1.2.1.tgz"},"maintainers":[{"name":"kenan","email":"kenan@kenany.me"}],"_npmUser":{"name":"kenan","email":"kenan@kenany.me"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-random-values_1.2.1_1598387330459_0.5703082246392057"},"_hasShrinkwrap":false,"publish_time":1598387330550,"_cnpm_publish_time":1598387330550,"_cnpmcore_publish_time":"2021-12-16T10:41:35.676Z"},"1.2.0":{"name":"get-random-values","version":"1.2.0","description":"`window.crypto.getRandomValues` with fallback to Node.js crypto","keywords":["crypto"],"repository":{"type":"git","url":"git+https://github.com/kenany/get-random-values.git"},"license":"MIT","author":{"name":"Kenan Yildirim","email":"kenan@kenany.me","url":"http://kenany.me/"},"main":"index.js","files":["index.js","LICENSE.txt"],"directories":{"test":"test"},"scripts":{"test":"tape test/*.js"},"dependencies":{"global":"^4.2.1"},"devDependencies":{"is-browser":"^2.0.1","lodash.foreach":"^3.0.3","lodash.isfunction":"^3.0.6","tape":"^4.4.0"},"browser":{"crypto":false},"gitHead":"57b6cd45765fd7e6d84163de1b1417890ecf54bf","bugs":{"url":"https://github.com/kenany/get-random-values/issues"},"homepage":"https://github.com/kenany/get-random-values#readme","_id":"get-random-values@1.2.0","_shasum":"32920ede81bed98265ff40371cf49299bd581ef1","_from":".","_npmVersion":"3.5.4","_nodeVersion":"5.3.0","_npmUser":{"name":"kenan","email":"kenan@kenany.me"},"dist":{"shasum":"32920ede81bed98265ff40371cf49299bd581ef1","size":2113,"noattachment":false,"key":"/get-random-values/-/get-random-values-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-random-values/download/get-random-values-1.2.0.tgz"},"maintainers":[{"name":"kenan","email":"kenan@kenany.me"}],"publish_time":1452265903550,"_hasShrinkwrap":false,"_cnpm_publish_time":1452265903550,"_cnpmcore_publish_time":"2021-12-16T10:41:35.915Z"},"1.1.1":{"name":"get-random-values","version":"1.1.1","description":"`window.crypto.getRandomValues` with fallback to Node.js crypto","keywords":["crypto"],"repository":{"type":"git","url":"https://github.com/KenanY/get-random-values"},"license":"MIT","author":{"name":"Kenan Yildirim","email":"kenan@kenany.me","url":"http://kenany.me/"},"main":"index.js","files":["index.js","LICENSE.txt"],"directories":{"test":"test"},"scripts":{"test":"tape test/*.js"},"dependencies":{"global":"^4.2.1"},"devDependencies":{"lodash.foreach":"^2.4.1","lodash.isfunction":"^2.4.1","tape":"^2.14.0"},"browser":{"crypto":false},"testling":{"files":"test/*.js","browsers":["chrome/11..latest","firefox/21..latest","safari/4.0..latest","opera/15.0..latest","iphone/6","ipad/6"]},"gitHead":"f5bf02c81c5c45ca515700323a055de9a5b941a4","bugs":{"url":"https://github.com/KenanY/get-random-values/issues"},"homepage":"https://github.com/KenanY/get-random-values","_id":"get-random-values@1.1.1","_shasum":"9293e3be82d4ea823f49c6173cbe87458c8ae489","_from":".","_npmVersion":"2.0.0","_npmUser":{"name":"kenan","email":"kenan@kenany.me"},"maintainers":[{"name":"kenan","email":"kenan@kenany.me"}],"dist":{"shasum":"9293e3be82d4ea823f49c6173cbe87458c8ae489","size":2099,"noattachment":false,"key":"/get-random-values/-/get-random-values-1.1.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-random-values/download/get-random-values-1.1.1.tgz"},"publish_time":1411057027620,"_hasShrinkwrap":false,"_cnpm_publish_time":1411057027620,"_cnpmcore_publish_time":"2021-12-16T10:41:36.113Z"},"1.1.0":{"name":"get-random-values","version":"1.1.0","description":"`window.crypto.getRandomValues` with fallback to Node.js crypto","keywords":["crypto"],"repository":{"type":"git","url":"https://github.com/KenanY/get-random-values"},"license":"MIT","author":{"name":"Kenan Yildirim","email":"kenan@kenany.me","url":"http://kenany.me/"},"main":"index.js","files":["index.js","LICENSE.txt"],"directories":{"test":"test"},"scripts":{"test":"tape test/*.js"},"dependencies":{"global":"^4.2.1"},"devDependencies":{"lodash.foreach":"^2.4.1","lodash.isfunction":"^2.4.1","tape":"^2.14.0"},"browser":{"crypto":false},"gitHead":"3c9024b1240bd6232286bdcd5d3118e1b903c303","bugs":{"url":"https://github.com/KenanY/get-random-values/issues"},"homepage":"https://github.com/KenanY/get-random-values","_id":"get-random-values@1.1.0","_shasum":"e2a9e31a40eed4fbccde175542730f9d7d93f2fe","_from":".","_npmVersion":"1.4.26","_npmUser":{"name":"kenan","email":"kenan@kenany.me"},"maintainers":[{"name":"kenan","email":"kenan@kenany.me"}],"dist":{"shasum":"e2a9e31a40eed4fbccde175542730f9d7d93f2fe","size":1992,"noattachment":false,"key":"/get-random-values/-/get-random-values-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-random-values/download/get-random-values-1.1.0.tgz"},"publish_time":1409943969592,"_hasShrinkwrap":false,"_cnpm_publish_time":1409943969592,"_cnpmcore_publish_time":"2021-12-16T10:41:36.341Z"},"1.0.1":{"name":"get-random-values","version":"1.0.1","description":"`window.crypto.getRandomValues` with fallback to Node.js crypto","keywords":["crypto"],"repository":{"type":"git","url":"git://github.com/KenanY/get-random-values"},"license":"MIT","author":{"name":"Kenan Yildirim","email":"kenan@kenany.me","url":"http://kenany.me/"},"main":"index.js","files":["index.js","LICENSE.txt"],"directories":{"test":"test"},"scripts":{"test":"tape test/*.js"},"dependencies":{"broquire":"^0.3.0","global":"^4.2.1"},"devDependencies":{"lodash.foreach":"^2.4.1","lodash.isfunction":"^2.4.1","tape":"^2.14.0"},"gitHead":"1e858a326499ad4cd47b04d65ae9905a04c0f8b7","bugs":{"url":"https://github.com/KenanY/get-random-values/issues"},"homepage":"https://github.com/KenanY/get-random-values","_id":"get-random-values@1.0.1","_shasum":"8555946a7ca96078dd5acab378a0ee5c6a6dad1f","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"kenan","email":"kenan@kenany.me"},"maintainers":[{"name":"kenan","email":"kenan@kenany.me"}],"dist":{"shasum":"8555946a7ca96078dd5acab378a0ee5c6a6dad1f","size":2016,"noattachment":false,"key":"/get-random-values/-/get-random-values-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-random-values/download/get-random-values-1.0.1.tgz"},"publish_time":1407427604127,"_hasShrinkwrap":false,"_cnpm_publish_time":1407427604127,"_cnpmcore_publish_time":"2021-12-16T10:41:36.553Z"},"1.0.0":{"name":"get-random-values","version":"1.0.0","description":"`window.crypto.getRandomValues` with fallback to Node.js crypto","keywords":["crypto"],"repository":{"type":"git","url":"git://github.com/KenanY/get-random-values"},"license":"MIT","author":{"name":"Kenan Yildirim","email":"kenan@kenany.me","url":"http://kenany.me/"},"main":"index.js","files":["index.js","LICENSE.txt"],"directories":{"test":"test"},"scripts":{"test":"tape test/*.js"},"dependencies":{"broquire":"^0.3.0","global":"^4.2.1"},"devDependencies":{"lodash.foreach":"^2.4.1","lodash.isfunction":"^2.4.1","tape":"^2.14.0"},"gitHead":"ad984c52f0a913b7d85d9c6234cc60ee544d1704","bugs":{"url":"https://github.com/KenanY/get-random-values/issues"},"homepage":"https://github.com/KenanY/get-random-values","_id":"get-random-values@1.0.0","_shasum":"603b8420f783de98c624715f55570e86da7c2a1b","_from":".","_npmVersion":"1.4.14","_npmUser":{"name":"kenan","email":"kenan@kenany.me"},"maintainers":[{"name":"kenan","email":"kenan@kenany.me"}],"dist":{"shasum":"603b8420f783de98c624715f55570e86da7c2a1b","size":1929,"noattachment":false,"key":"/get-random-values/-/get-random-values-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/get-random-values/download/get-random-values-1.0.0.tgz"},"publish_time":1407384386163,"_hasShrinkwrap":false,"_cnpm_publish_time":1407384386163,"_cnpmcore_publish_time":"2021-12-16T10:41:36.801Z"}},"readme":"# get-random-values\n\n`window.crypto.getRandomValues` or `window.msCrypto.getRandomValues` or\n`require('crypto').randomBytes` or an _Error_.\n\n## Example\n\n``` javascript\nvar getRandomValues = require('get-random-values');\n\nvar array = new Uint32Array(10);\ngetRandomValues(array);\n// => [\n// =>   183,\n// =>   76,\n// =>   18,\n// =>   177,\n// =>   73,\n// =>   9,\n// =>   50,\n// =>   248,\n// =>   216,\n// =>   104\n// => ]\n```\n\n## Installation\n\n``` bash\n$ npm install get-random-values\n```\n\n## API\n\n``` javascript\nvar getRandomValues = require('get-random-values');\n```\n\n### `getRandomValues(buf)`\n\nFills integer-based _TypedArray_ `buf` with cryptographically random numbers.\nChecks for and uses the first of the following:\n\n  - `window.crypto.getRandomValues`\n  - `window.msCrypto.getRandomValues`\n  - Node.js crypto\n\nIf none of the above are available, then an _Error_ is thrown.\n\nThrows _QuotaExceededError_ if `buf.length > 65536` (even if Node.js crypto,\nwhich doesn't have that limit, is being used).\n\n`buf` **must** be a _Uint8Array_ if Node.js crypto is used, otherwise a\n_TypeError_ will be thrown.\n","_attachments":{},"homepage":"https://github.com/KenanY/get-random-values#readme","bugs":{"url":"https://github.com/KenanY/get-random-values/issues"},"license":"MIT"}