{"versions":{"1.0.0":{"version":"1.0.0","name":"@lukeed/uuid","repository":{"type":"git","url":"git+https://github.com/lukeed/uuid.git"},"description":"A tiny (250B), fast, and cryptographically secure UUID (v4) generator for Node and the browser","browser":"dist/index.esm.js","unpkg":"dist/index.min.js","module":"dist/index.mjs","main":"dist/index.js","types":"uuid.d.ts","umd:name":"uuid","license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"https://lukeed.com"},"engines":{"node":">=8"},"scripts":{"build":"node bin","pretest":"npm run build","test":"tape -r esm test/*.js | tap-spec"},"keywords":["guid","browser","isomorphic","rfc4122","random","uuid","uid"],"devDependencies":{"bundt":"1.0.0","esm":"3.2.25","is-uuid":"1.0.2","premove":"1.0.0","tap-spec":"5.0.0","tape":"4.13.0"},"gitHead":"ca0eb16182f977287367f90674191b07b4f74980","bugs":{"url":"https://github.com/lukeed/uuid/issues"},"homepage":"https://github.com/lukeed/uuid#readme","_id":"@lukeed/uuid@1.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"anonymous","email":"luke@lukeed.com"},"dist":{"integrity":"sha512-TcaLvtk+IxzOn0g7Dct/a+kdjbNRvATM/cVnHPjpVP9u4Js53fa81n316goOkQ29/KpIRq2jjRpDhn4/A8dGxQ==","shasum":"2bfa9381a3979cd79301440ae0b45cb7252a7388","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@lukeed/uuid/-/uuid-1.0.0.tgz","fileCount":8,"unpackedSize":7021,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeWqfaCRA9TVsSAnZWagAAKvEP/1A7Wi5ZpTrA3P4d08W+\nQ1mY+fjS0+9uQC5KA0DEf+HmNCFaW7vhSAv0Lsn5z/Aa2n1mE9t2nAcc2CV4\np5IDchBgAI5++dL0lkyp9pc4H9KUQ5UixGlsjRbJKKMZp3MrZXPbLFrastUB\nx+hKeLbuApYxs1lQVQRc0ikG5iuv54rEZTlJDQYus0sB1trTw0KS6UeoxG/E\na+TTHUPgxHnUH5YRxgS/VgaL76bhLZCYS7tK3gu46EyjfB1eY7Ks//qGPsD+\n10ht83XPwus17NyOKgLeyMLDxdYp3u8jOedH/MZHYSWvSTZ7fdEtQyw+OnZa\nIAhsTgKN+ExtZ3azMRoNOXkF2EfCht59OGN6Liyz+TAo7AuTO7XkdVk7WROK\nolHeDzgD5vWSvAi7amjxokBCJ6yFYyJTQKzJSgro+Z+cTpwcdC8/2jLuyn85\nzIqkMsIKTO76ra5B9ysJtTm5ZOhT2g3E3YinqKp7e+S00qOCBliJz2yYCID0\nl39JOGsfQ04RYAD4xpRps4O1/GmPH+Qza9vBRsOGINeS5VPBvfd9/WAdqols\narYsHXV+ARq+eXly0by0TfMNOdrlzVC4d5HYsdqSllNIQCa7FZhrOW4mgIgm\nKLybgr4nEV/etwV2T0U5tNPCWuetwupUITazbs7iEPcknEvgf1bGJORWUfKd\n4kow\r\n=6LPZ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBXS9U4v+oHGUyFhdqAUKnXbap8Vzy7YOsvkPTexQ3feAiEA110kRRk7z0S6cx9VjpdpfmnXU8He9QKs285wgbF38dA="}]},"maintainers":[{"name":"anonymous","email":"luke@lukeed.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uuid_1.0.0_1582999514093_0.10551916778490256"},"_hasShrinkwrap":false,"contributors":[]},"1.0.1":{"version":"1.0.1","name":"@lukeed/uuid","repository":{"type":"git","url":"git+https://github.com/lukeed/uuid.git"},"description":"A tiny (230B), fast, and cryptographically secure UUID (v4) generator for Node and the browser","browser":"dist/index.esm.js","unpkg":"dist/index.min.js","module":"dist/index.mjs","main":"dist/index.js","types":"uuid.d.ts","umd:name":"uuid","license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"https://lukeed.com"},"engines":{"node":">=8"},"scripts":{"build":"node bin","pretest":"npm run build","test":"tape -r esm test/*.js | tap-spec"},"keywords":["guid","browser","isomorphic","rfc4122","random","uuid","uid"],"devDependencies":{"bundt":"1.0.0","esm":"3.2.25","is-uuid":"1.0.2","premove":"1.0.0","tap-spec":"5.0.0","tape":"4.13.0"},"gitHead":"e490aa19ecb4b4cd5ab11cdabf53c653eb38acdd","bugs":{"url":"https://github.com/lukeed/uuid/issues"},"homepage":"https://github.com/lukeed/uuid#readme","_id":"@lukeed/uuid@1.0.1","_npmVersion":"6.4.1","_nodeVersion":"10.13.0","_npmUser":{"name":"anonymous","email":"luke@lukeed.com"},"dist":{"integrity":"sha512-shtopUGL/WuVicOTppRGDb2he9aGp+OF5EB11Xsbe3K4W6qN7HtK3F+ayNxcfbrG/SSL/Z9B+Xrb0Foz9x83gw==","shasum":"5446a157272a63ed84026e06b905ca916f049e98","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@lukeed/uuid/-/uuid-1.0.1.tgz","fileCount":8,"unpackedSize":6673,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeW0KcCRA9TVsSAnZWagAA5sgP+gOou3EAyIHpFvfNlGgj\n3KLRzTn/2aJdll6LuzBbHkruy245AxQIwNIARcy8jECSqznym5PJjZOJHfJF\n03jpxIrigX3s9PSev24YPJJqHD2PI3s6PqGZ0U89eQVBuev7NH/d1DB7aCTr\ndpQ9iRg8ovf9H0hFEr2NWGl4+nAUjrsHSYQpKyjyowk1dGM8mgeZCkVJq+Zf\nLz08/n6TVOn2XUw/o8O4M8a8tR8P+1zVOQzQOSsWg+c8XsS6X9cziLW8k5wt\nqXUUbk6uP1vQyYsqyqsO91OLlZtl06ueSZ4sRwmWaR5XxzcDapqjpkGCiNya\nVm90uv6Cy3LuuoTWORu2wAOtpvEZ1MhW7EjIsojHVehTiwn2ZiOe1cHwA4fL\nlq54UdG3JyqlsoUyZYSRLO9VmbtMo6MycW5XAxDY2D7b18JEh/nT9SLUSzUu\n7HEdz/pN8yNV42qZe1qm2RdktgelXbzrFD7CN9UpM7IPZ2GXLZAEblXoSnod\nrD9z0UMK3J6nUN7UGVHOPPTtGeNJ4V3ztoa/NjSpi7B3jdI1FJGb2WGM5YzS\nyiMW1l6SnArpcrCijsEFjieXEqCgo5B10p3BzAwXOgouwPaPtHp627TcRN9G\nkGi7ttzB40akABNDQI+0esSREvTLDjClFbaMRiEpsBTKx9NxVk51xPxzUJ7a\nvK+L\r\n=i2p+\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAQuKwch1fqYEOvwO337Z9FtqGpgTHQq/8IG4xKrk645AiEApTJDO8HT5hyaUCu8q/oklUJ1QBVKCYuVUjpquFFoq0E="}]},"maintainers":[{"name":"anonymous","email":"luke@lukeed.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uuid_1.0.1_1583039132457_0.9271296813348653"},"_hasShrinkwrap":false,"contributors":[]},"2.0.0":{"version":"2.0.0","name":"@lukeed/uuid","repository":{"type":"git","url":"git+https://github.com/lukeed/uuid.git"},"description":"A tiny (230B) and fast UUID (v4) generator for Node and the browser","unpkg":"dist/index.min.js","module":"dist/index.mjs","main":"dist/index.js","types":"index.d.ts","umd:name":"uuid","license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"https://lukeed.com"},"engines":{"node":">=8"},"scripts":{"build":"bundt","pretest":"npm run build","test":"uvu -r esm test"},"exports":{".":{"import":"./dist/index.mjs","require":"./dist/index.js"},"./secure":{"import":"./secure/index.mjs","require":"./secure/index.js"},"./package.json":"./package.json"},"modes":{"secure":"src/secure.js","default":"src/index.js"},"keywords":["guid","secure","browser","cryptographic","isomorphic","rfc4122","random","crypto","csprng","uuid","uid"],"dependencies":{"@lukeed/csprng":"^1.0.0"},"devDependencies":{"bundt":"1.1.1","esm":"3.2.25","is-uuid":"1.0.2","uvu":"0.3.4"},"gitHead":"0e921822c5f91f6a9b741ccd7c6aea1ae884a9a9","bugs":{"url":"https://github.com/lukeed/uuid/issues"},"homepage":"https://github.com/lukeed/uuid#readme","_id":"@lukeed/uuid@2.0.0","_nodeVersion":"12.18.4","_npmVersion":"6.14.6","dist":{"integrity":"sha512-dUz8OmYvlY5A9wXaroHIMSPASpSYRLCqbPvxGSyHguhtTQIy24lC+EGxQlwv71AhRCO55WOtgwhzQLpw27JaJQ==","shasum":"1c0f33c071cb6902bc3b9e475782ada7314ef9bd","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@lukeed/uuid/-/uuid-2.0.0.tgz","fileCount":11,"unpackedSize":9150,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfmal1CRA9TVsSAnZWagAAuf4P/2Mvlm2qYjyZTUaoKb0U\nEZ/98w4rjr7NkVd2/yUuUgOzwR2tu3AtLq7grRokSxNX1jWTL4JtIkkmpCII\nz2RMKq61h8JKOOfgYYU0q+3NVgynCLk8d3ByNh+OG3SjlwXWsrsVy0gA27D8\nKO9ugkwp77vlke17q3HlPSSt/WF3bjKJmOTRy5rPPyLfTcOicRv/uqGhQreG\noRS3tlGxANZMNGNGIzAR/8DuW+B9Oc6Q/oNFHTMvyZWfRtgVVhDwtUxMIhTy\n6J3U3hL5ZNAjLRnIYEAOClrklIa42ZGVfkQJJJpTCWtpWhKicVAjCW8G9nxm\nNpFLtk39U8rhS9aG8yjeWqUJV+4QMLyKyl9WyDrrWsRclrHoyYhIFXhmWFcP\naU48KKrD6azA9qHg18VbGOKEQrVgIz35+bxHxA8jvNI7hF+6Q4KzT3pMo6X6\n+lx2ZolexUghefckgi4YlPgiDlribS8wPh9TLGEeD8b7ebvMTwcQHJ/yjv8y\nBAc45HRIdEE5yE0MOzqVaRx3/CT/FCT1YsoQHUUj2Im9jNjhRDfDdWLYKPl9\nDl3nKtLV4iVqLnYdUrcC3dfXwbAjePw5zfKUowcK96xwPTV0OKQmeNwtRhnH\nIWp1nuoDBcU5WC0ufT0YrxgzxHqjtfaXpsRHg0wGJQq/Iy4z8OlgYq+Apa+v\nrlpM\r\n=xYs7\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDNopvEt/mlAQlAGR/LcUsPMr/Hjiki2I7m9ZkQ80R42QIhANRUkQmtyr8lyRWZLmXUaMjq5tQOP+2VBdwH+X/QymIw"}]},"maintainers":[{"name":"anonymous","email":"luke@lukeed.com"}],"_npmUser":{"name":"anonymous","email":"luke@lukeed.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uuid_2.0.0_1603905909410_0.2810434860316602"},"_hasShrinkwrap":false,"contributors":[]},"2.0.1":{"version":"2.0.1","name":"@lukeed/uuid","repository":{"type":"git","url":"git+https://github.com/lukeed/uuid.git"},"description":"A tiny (230B) and fast UUID (v4) generator for Node and the browser","unpkg":"dist/index.min.js","module":"dist/index.mjs","main":"dist/index.js","types":"index.d.ts","umd:name":"uuid","license":"MIT","author":{"name":"Luke Edwards","email":"luke.edwards05@gmail.com","url":"https://lukeed.com"},"engines":{"node":">=8"},"scripts":{"build":"bundt","pretest":"npm run build","test":"uvu -r esm test"},"exports":{".":{"types":"./index.d.ts","import":"./dist/index.mjs","require":"./dist/index.js"},"./secure":{"types":"./secure/index.d.ts","import":"./secure/index.mjs","require":"./secure/index.js"},"./package.json":"./package.json"},"modes":{"secure":"src/secure.js","default":"src/index.js"},"keywords":["guid","secure","browser","cryptographic","isomorphic","rfc4122","random","crypto","csprng","uuid","uid"],"dependencies":{"@lukeed/csprng":"^1.1.0"},"devDependencies":{"bundt":"1.1.1","esm":"3.2.25","is-uuid":"1.0.2","uvu":"0.3.4"},"gitHead":"fa7660cb9714eaa2e71b42e6079cc7e30abfbb53","bugs":{"url":"https://github.com/lukeed/uuid/issues"},"homepage":"https://github.com/lukeed/uuid#readme","_id":"@lukeed/uuid@2.0.1","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-qC72D4+CDdjGqJvkFMMEAtancHUQ7/d/tAiHf64z8MopFDmcrtbcJuerDtFceuAfQJ2pDSfCKCtbqoGBNnwg0w==","shasum":"4f6c34259ee0982a455e1797d56ac27bb040fd74","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/@lukeed/uuid/-/uuid-2.0.1.tgz","fileCount":11,"unpackedSize":9770,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHqbj/5GuX33+JNaUnOEzaa9dJNtCxfiM1JxM7KcBbveAiEAmPgbCwaOLNJJTzl0ykJl6TFGQ0R41gzJpQD6k2JA7BQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkJzs4ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqpeQ/+NXRJTE8j/kCFkOjHwc/hwBxpYhiciujpLg9xQaj0R3ewIBZ3\r\nsEMDNYWZQWO7ruxdD5wvaeNqG2ggBnbGxCmFXIOHmG2OCrEgP9YVgCaKSacP\r\nCFnyMWnovG5Z1ukaS3JRPU9ygIYcjkErIWlCBzJE3LJLxLFLTvQqXhQ3ERj/\r\ndIaRWBiXcjnqU7s5tThQubPotGNw9z5kTKLvJ1G+gaL6fO8i/OCSVHnhyKkr\r\nSrUD+5oWkKu9ZL9LkIxvXlz/ivPuOISQ2byUJaj0E/mNa37UjZd3QVHMBjnA\r\n1qLJ3DvCs/w7c7Ak85tZQj34Pg/yzpI2msbDkTr19cqTaCfhRgWbm+RGuB3a\r\nnZglAmrcDcM81fWJHkBqlKr1kkFs/HwO1Vji+T+5+4zydX2BM32zcAQfsKGS\r\n9OF+pepci42OqgY/N8UazcdFeN9vjLZY6P8TUPVOnVt9VKQco9dNO+JoyrNm\r\nGgOkseIKmZCyj64B2Zt0bsGzjuX2ADrX+jmBcDSmWrmrJMtREgLetf05TnJd\r\nAQdDmtzg3wNrXcsJRGeZWVaRkCdEcsl5o9C5dNxJqnjjAuNYLQspLE8kOxcv\r\nR3OTLwoQzgrK859tm9jqxRgyxpYCVM9JQkQf/3j42e9+dy1tjeOj0T6rKKUR\r\nIRE7saWSz7rldBtRo8QwfKNmnVv8aNcEGS8=\r\n=XFYk\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"anonymous","email":"luke@lukeed.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"luke@lukeed.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/uuid_2.0.1_1680292663914_0.5707269810613675"},"_hasShrinkwrap":false,"contributors":[]}},"dist-tags":{"latest":"2.0.1"},"name":"@lukeed/uuid","time":{"created":"2022-01-27T14:39:37.642Z","1.0.0":"2020-02-29T18:05:14.308Z","modified":"2023-07-27T22:05:56.545Z","1.0.1":"2020-03-01T05:05:32.563Z","2.0.0":"2020-10-28T17:25:09.553Z","2.0.1":"2023-03-31T19:57:44.068Z"},"readme":"# @lukeed/uuid ![CI](https://github.com/lukeed/uuid/workflows/CI/badge.svg) [![codecov](https://badgen.now.sh/codecov/c/github/lukeed/uuid)](https://codecov.io/gh/lukeed/uuid)\n\n> A tiny (~230B) and [fast](#benchmarks) UUID (v4) generator for Node and the browser.\n\nThis module offers two [modes](#modes) for your needs:\n\n* [`@lukeed/uuid`](#lukeeduuid)<br>_The default is \"non-secure\", which uses `Math.random` to produce UUIDs._\n* [`@lukeed/uuid/secure`](#lukeeduuidsecure)<br>_The \"secure\" mode produces cryptographically secure (CSPRNG) UUIDs using the current environment's `crypto` module._\n\n> **Important:** <br>Version `1.0.0` only offered a \"secure\" implementation.<br>In `v2.0.0`, this is now exported as the `\"@lukeed/uuid/secure\"` entry.\n\nAdditionally, this module is preconfigured for native ESM support in Node.js with fallback to CommonJS. It will also work with any Rollup and webpack configuration.\n\n\n## Install\n\n```\n$ npm install --save @lukeed/uuid\n```\n\n## Modes\n\nThere are two \"versions\" of `@lukeed/uuid` available:\n\n#### `@lukeed/uuid`\n> **Size (gzip):** 231 bytes<br>\n> **Availability:** [CommonJS](https://unpkg.com/@lukeed/uuid/dist/index.js), [ES Module](https://unpkg.com/@lukeed/uuid/dist/index.mjs), [UMD](https://unpkg.com/@lukeed/uuid/dist/index.min.js)\n\nRelies on `Math.random`, which means that, while faster, this mode **is not** cryptographically secure. <br>Works in Node.js and all browsers.\n\n#### `@lukeed/uuid/secure`\n> **Size (gzip):** 235 bytes<br>\n> **Availability:** [CommonJS](https://unpkg.com/@lukeed/uuid/secure/index.js), [ES Module](https://unpkg.com/@lukeed/uuid/secure/index.mjs), [UMD](https://unpkg.com/@lukeed/uuid/secure/index.min.js)\n\nRelies on the environment's `crypto` module in order to produce cryptographically secure (CSPRNG) values. <br>Works in all versions of Node.js. Works in all browsers with [`crypto.getRandomValues()` support](https://caniuse.com/#feat=getrandomvalues).\n\n\n## Usage\n\n```js\nimport { v4 as uuid } from '@lukeed/uuid';\nimport { v4 as secure } from '@lukeed/uuid/secure';\n\nuuid(); //=> '400fa120-5e9f-411e-94bd-2a23f6695704'\nuuid(); //=> 'cd6ffb4d-2eda-4c84-aef5-71eb360ac8c5'\n\nsecure(); //=> '8641f70e-8112-4168-9d81-d38170bfa612'\nsecure(); //=> 'd175fabc-2a4d-475f-be56-29ba8104c2f2'\n```\n\n\n## API\n\n### uuid.v4()\nReturns: `string`\n\nCreates a new Version 4 (random) [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUID.\n\n\n## Benchmarks\n\n> Running on Node.js v12.18.4\n\n```\nValidation:\n  ✔ String.replace(Math.random)\n  ✔ String.replace(crypto)\n  ✔ uuid/v4\n  ✔ @lukeed/uuid\n  ✔ @lukeed/uuid/secure\n\nBenchmark:\n  String.replace(Math.random)  x    381,358 ops/sec ±0.31% (93 runs sampled)\n  String.replace(crypto)       x     15,842 ops/sec ±1.16% (86 runs sampled)\n  uuid/v4                      x  1,259,600 ops/sec ±0.45% (91 runs sampled)\n  @lukeed/uuid                 x  6,384,840 ops/sec ±0.22% (95 runs sampled)\n  @lukeed/uuid/secure          x  5,439,096 ops/sec ±0.23% (98 runs sampled)\n```\n\n> Running on Chrome v85.0.4183.121\n\n```\nValidation:\n  ✔ String.replace(Math.random)\n  ✔ uuid/v4\n  ✔ @lukeed/uuid\n  ✔ @lukeed/uuid/secure\n\nBenchmark:\n  String.replace(Math.random)  x    313,213 ops/sec ±0.58% (65 runs sampled)\n  uuid/v4                      x    302,914 ops/sec ±0.94% (64 runs sampled)\n  @lukeed/uuid                 x  5,881,761 ops/sec ±1.29% (62 runs sampled)\n  @lukeed/uuid/secure          x    852,939 ops/sec ±0.88% (65 runs sampled)\n```\n\n## Performance\n\nThe reason why this UUID.V4 implementation is so much faster is two-fold:\n\n1) It composes an output with hexadecimal pairs (from a cached dictionary) instead of single characters.\n2) It allocates a larger Buffer/ArrayBuffer up front (expensive) and slices off chunks as needed (cheap).\n\nThe `@lukeed/uuid/secure` module maintains an internal ArrayBuffer of 4096 bytes, which supplies **256** `uuid.v4()` invocations. However, the default module preallocates **256** invocations using less memory upfront. Both implementations will regenerate its internal allocation as needed.\n\nA larger buffer would result in higher performance over time, but I found this to be a good balance of performance and memory space.\n\n## License\n\nMIT © [Luke Edwards](https://lukeed.com)","users":{}}