{"name":"uuid","version":"7.0.2-beta.0","keywords":["uuid","guid","rfc4122"],"license":"MIT","_id":"uuid@7.0.2-beta.0","maintainers":[{"name":"broofa","email":"robert@broofa.com"},{"name":"ctavan","email":"dev@tavan.de"},{"name":"defunctzombie","email":"shtylman@gmail.com"},{"name":"vvo","email":"vincent.voyer@gmail.com"}],"contributors":[{"name":"Robert Kieffer","email":"robert@broofa.com"},{"name":"Christoph Tavan","email":"dev@tavan.de"},{"name":"AJ ONeal","email":"coolaj86@gmail.com"},{"name":"Vincent Voyer","email":"vincent@zeroload.net"},{"name":"Roman Shtylman","email":"shtylman@gmail.com"}],"homepage":"https://github.com/uuidjs/uuid#readme","bugs":{"url":"https://github.com/uuidjs/uuid/issues"},"bin":{"uuid":"dist/bin/uuid"},"dist":{"shasum":"8cc5d456c79a9dcb527108a799639cbf2e764bab","tarball":"http://registry-npm.ywwl.com/uuid/download/uuid-7.0.2-beta.0.tgz","fileCount":49,"integrity":"sha512-nWN1O0baX9+xv8DxMl6O5ERk0R/4xAuCkosXBNB68m1PReciNwzBoO9xzf8wX4HrXpfbcu9Mpo5mmgLcsDTZlA==","signatures":[{"sig":"MEYCIQC4/RXXIVroLLrt7JIwsDWRVU/RV3w6ZhK4uPYzW4OGqAIhAPy/0+kzMucTPT0DgX9MOIqIpa5K9SXBowjXiyg9Gh88","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":91761,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeXW0MCRA9TVsSAnZWagAAvn8QAJHGY0rSQicG6809E5rG\nkOMu13oLNhO27M98xi5uOak2eYG3hsKqDKnngsUDqKj7wbWWyKAEN3kbhOfS\nF97vJaf+DbxQtnbDL5YZSMtYYmOAjpTsAkYP2vnRc2ovWUXRwR0f2O5Q5idX\nHwRLIpIUUsYEwFKq8Re9oTJnLGcQWLWmIdv3lEaujX9fsEInC8hb5aFZGrJJ\nx4HA5hcNcJK6gZt4G6wAqbgqKDvouR73IDOYyFST3G6VwlXD/ZA7Gx6KGqHu\nu+okHWuKybJwK7xJzoa8qs0gdXTmqSc5a6oQGKWFj6C4oa22EMaprDTn27xv\npYf4phKKEKr2UWyhZPVfdW4oeAtinetxM6gV6vLt2f6MQizXekUibzJRzLn+\n9B8bXeEiYOXWK8RZKwPlDl20fOXdYgLjHq/uo7DCh4FOq43nf7q+1eS+r6oo\n21dYXEFvwXYgHtF2JkqfXjN0xfhyt2+JSVEiYH6DJUDC/QRPYVEeitKa6zDK\nyWBNUHP8CidgLUG4Kj3wjQKYqjoMXZNdE0QJpVZZLMj+CjfvqQSPXcLjyc8g\nhGI6B7HTRZVyqt6GyhTVM4L+lwZh79N6flLcWtKYPAv5jSTrGOFAIwWvN2Sh\nVDZJYABAVS0APfqhLV/k1U2h2qZCLWvBcBpoStr09+A77JY67DcUOzxCS2tx\nX9f0\r\n=YJwA\r\n-----END PGP SIGNATURE-----\r\n","size":22280,"noattachment":false,"key":"/uuid/-/uuid-7.0.2-beta.0.tgz"},"main":"dist/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"lint-staged"}},"module":"dist/esm-node/index.js","readme":"<!--\n  -- This file is auto-generated from README_js.md. Changes should be made there.\n  -->\n\n# uuid [![Build Status](https://github.com/uuidjs/uuid/workflows/CI/badge.svg)](https://github.com/uuidjs/uuid/actions)\n\nFor the creation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDs\n\n- **Complete** - Support for RFC4122 version 1, 3, 4, and 5 UUIDs\n- **Cross-platform** - Support for ...\n  - CommonJS, [ECMAScript Modules](#ecmascript-modules) and UMD builds\n  - Node 8, 10, 12\n  - Chrome, Safari, Firefox, Edge, IE 11 browsers\n  - Webpack and rollup.js module bundlers\n  - React Native ([see note](#getrandomvalues-not-supported))\n- **Secure** - Cryptographically-strong random values\n- **Small** - Zero-dependency, small footprint, plays nice with \"tree shaking\" packagers\n- **CLI** - Includes the [`uuid` command line](#command-line) utility\n\n**Upgrading from uuid\\@3?** Your code is probably okay, but check out [Upgrading\nFrom uuid\\@3](#upgrading-from-uuid3) for details.\n\n## Quickstart - Node.js/CommonJS\n\n```shell\nnpm install uuid\n```\n\nOnce installed, decide which type of UUID you need. RFC4122 provides for four\nversions, all of which are supported here. In order of popularity, they are:\n\n- Version 4 (random) - Created from cryptographically-strong random values\n- Version 1 (timestamp) - Created from the system clock (plus random values)\n- Version 5 (namespace, SHA-1) - Created from user-supplied name and namespace strings\n- Version 3 (namespace, MD5) - Like version 5, above, but with a poorer hash algorithm\n\n**Unsure which one to use?** Use version 4 (random) unless you have a specific need for one of the other versions. See also [this FAQ](https://github.com/tc39/proposal-uuid#faq).\n\n### Create Version 4 (Random) UUIDs\n\n```javascript\nimport { v4 as uuidv4 } from 'uuid';\nuuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'\n```\n\n### Create Version 1 (Timestamp) UUIDs\n\n```javascript\nimport { v1 as uuidv1 } from 'uuid';\nuuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8b2d-1b9d6bcdbbfd'\n```\n\n### Create Version 3 or Version 5 (Namespace) UUIDs\n\n&#x26a0;&#xfe0f; Version 3 and Version 5 UUIDs are basically the same, differing\nonly in the underlying hash algorithm. Note that per the RFC, \"_If backward\ncompatibility is not an issue, SHA-1 [Version 5] is preferred_.\"\n\n&#x26a0;&#xfe0f; If using a custom namespace **be sure to generate your own\nnamespace UUID**. You can grab one [here](https://www.uuidgenerator.net/).\n\n```javascript\nimport { v5 as uuidv5 } from 'uuid'; // For version 5\nimport { v3 as uuidv3 } from 'uuid'; // For version 3\n\n// Using predefined DNS namespace (for domain names)\nuuidv5('hello.example.com', uuidv5.DNS); // ⇨ 'fdda765f-fc57-5604-a269-52a7df8164ec'\nuuidv3('hello.example.com', uuidv3.DNS); // ⇨ '9125a8dc-52ee-365b-a5aa-81b0b3681cf6'\n\n// Using predefined URL namespace (for URLs)\nuuidv5('http://example.com/hello', uuidv5.URL); // ⇨ '3bbcee75-cecc-5b56-8031-b6641c1ed1f1'\nuuidv3('http://example.com/hello', uuidv3.URL); // ⇨ 'c6235813-3ba4-3801-ae84-e0a6ebb7d138'\n\n// Using a custom namespace (See note, above, about generating your own\n// namespace UUID)\nconst MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341';\nuuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681'\nuuidv3('Hello, World!', MY_NAMESPACE); // ⇨ 'e8b5a51d-11c8-3310-a6ab-367563f20686'\n```\n\n## API\n\n### Version 4 (Random)\n\n```javascript\nimport { v4 as uuidv4 } from 'uuid';\n\n// Incantations\nuuidv4();\nuuidv4(options);\nuuidv4(options, buffer, offset);\n```\n\nGenerate and return a RFC4122 version 4 UUID.\n\n- `options` - (Object) Optional uuid state to apply. Properties may include:\n  - `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values. Takes precedence over `options.rng`.\n  - `rng` - (Function) Random # generator function that returns an Array[16] of byte values (0-255). Alternative to `options.random`.\n- `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n- `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nExample: Generate string UUID with predefined `random` values\n\n```javascript\nconst v4options = {\n  random: [\n    0x10,\n    0x91,\n    0x56,\n    0xbe,\n    0xc4,\n    0xfb,\n    0xc1,\n    0xea,\n    0x71,\n    0xb4,\n    0xef,\n    0xe1,\n    0x67,\n    0x1c,\n    0x58,\n    0x36,\n  ],\n};\nuuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836'\n```\n\nExample: Generate two IDs in a single buffer\n\n```javascript\nconst buffer = new Array();\nuuidv4(null, buffer, 0); // ⇨ \n  // [\n  //   155, 29, 235,  77,  59,\n  //   125, 75, 173, 155, 221,\n  //    43, 13, 123,  61, 203,\n  //   109\n  // ]\nuuidv4(null, buffer, 16); // ⇨ \n  // [\n  //   155,  29, 235,  77,  59, 125,  75, 173,\n  //   155, 221,  43,  13, 123,  61, 203, 109,\n  //    27, 157, 107, 205, 187, 253,  75,  45,\n  //   155,  93, 171, 141, 251, 189,  75, 237\n  // ]\n```\n\n### Version 1 (Timestamp)\n\n```javascript\nimport { v1 as uuidv1 } from 'uuid';\n\n// Incantations\nuuidv1();\nuuidv1(options);\nuuidv1(options, buffer, offset);\n```\n\nGenerate and return a RFC4122 version 1 (timestamp) UUID.\n\n- `options` - (Object) Optional uuid state to apply. Properties may include:\n  - `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1.\n  - `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used.\n  - `msecs` - (Number) Time in milliseconds since unix Epoch. Default: The current time is used.\n  - `nsecs` - (Number between 0-9999) additional time, in 100-nanosecond units. Ignored if `msecs` is unspecified. Default: internal uuid counter is used, as per 4.2.1.2.\n  - `random` - (Number[16]) Array of 16 numbers (0-255) to use for initialization of `node` and `clockseq` as described above. Takes precedence over `options.rng`.\n  - `rng` - (Function) Random # generator function that returns an Array[16] of byte values (0-255). Alternative to `options.random`.\n- `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n- `offset` - (Number) Starting index in `buffer` at which to begin writing.\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nNote: The default [node id](https://tools.ietf.org/html/rfc4122#section-4.1.6) (the last 12 digits in the UUID) is generated once, randomly, on process startup, and then remains unchanged for the duration of the process.\n\nExample: Generate string UUID with fully-specified options\n\n```javascript\nconst v1options = {\n  node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],\n  clockseq: 0x1234,\n  msecs: new Date('2011-11-01').getTime(),\n  nsecs: 5678,\n};\nuuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab'\n```\n\nExample: In-place generation of two binary IDs\n\n```javascript\n// Generate two ids in an array\nconst arr = new Array();\nuuidv1(null, arr, 0); // ⇨ \n  // [\n  //    44,  94, 164, 192,  64,\n  //   103,  17, 233, 146,  52,\n  //    27, 157, 107, 205, 187,\n  //   253\n  // ]\nuuidv1(null, arr, 16); // ⇨ \n  // [\n  //    44, 94, 164, 192,  64, 103,  17, 233,\n  //   146, 52,  27, 157, 107, 205, 187, 253,\n  //    44, 94, 164, 193,  64, 103,  17, 233,\n  //   146, 52,  27, 157, 107, 205, 187, 253\n  // ]\n```\n\n### Version 5 (Namespace)\n\n```javascript\nimport { v5 as uuidv5 } from 'uuid';\n\n// Incantations\nuuidv5(name, namespace);\nuuidv5(name, namespace, buffer);\nuuidv5(name, namespace, buffer, offset);\n```\n\nGenerate and return a RFC4122 version 5 UUID.\n\n- `name` - (String | Array[]) \"name\" to create UUID with\n- `namespace` - (String | Array[]) \"namespace\" UUID either as a String or Array[16] of byte values\n- `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n- `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nExample:\n\n```javascript\nuuidv5('hello world', MY_NAMESPACE); // ⇨ '9f282611-e0fd-5650-8953-89c8e342da0b'\n```\n\n### Version 3 (Namespace)\n\n&#x26a0;&#xfe0f; Note: Per the RFC, \"_If backward compatibility is not an issue, SHA-1 [Version 5] is preferred_.\"\n\n```javascript\nimport { v3 as uuidv3 } from 'uuid';\n\n// Incantations\nuuidv3(name, namespace);\nuuidv3(name, namespace, buffer);\nuuidv3(name, namespace, buffer, offset);\n```\n\nGenerate and return a RFC4122 version 3 UUID.\n\n- `name` - (String | Array[]) \"name\" to create UUID with\n- `namespace` - (String | Array[]) \"namespace\" UUID either as a String or Array[16] of byte values\n- `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written.\n- `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0\n\nReturns `buffer`, if specified, otherwise the string form of the UUID\n\nExample:\n\n```javascript\nuuidv3('hello world', MY_NAMESPACE); // ⇨ '042ffd34-d989-321c-ad06-f60826172424'\n```\n\n## Command Line\n\nUUIDs can be generated from the command line using `uuid`.\n\n```shell\n$ uuid\nddeb27fb-d9a0-4624-be4d-4615062daed4\n```\n\nThe default is to generate version 4 UUIDS, however the other versions are supported. Type `uuid --help` for details:\n\n```\n$ uuid --help\n\nUsage:\n  uuid\n  uuid v1\n  uuid v3 <name> <namespace uuid>\n  uuid v4\n  uuid v5 <name> <namespace uuid>\n  uuid --help\n\nNote: <namespace uuid> may be \"URL\" or \"DNS\" to use the corresponding UUIDs\ndefined by RFC4122\n```\n\n## ECMAScript Modules\n\nFor usage in the browser `uuid` provides support for [ECMAScript\nModules](https://www.ecma-international.org/ecma-262/6.0/#sec-modules) (ESM) that enable\ntree-shaking for bundlers, like [rollup.js](https://rollupjs.org/guide/en/#tree-shaking)\n([example](./examples/browser-rollup/)) and [webpack](https://webpack.js.org/guides/tree-shaking/)\n([example](./examples/browser-webpack/)).\n\n```javascript\nimport { v4 as uuidv4 } from 'uuid';\nuuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed'\n```\n\nThere is experimental native ESM support for [the browser](./examples/browser-esmodules/) but it\nshould not be considered ready for production use and may change or disappear in future releases.\n\nTo run the examples you must first create a dist build of this library in the module root:\n\n```\nnpm run build\n```\n\n## UMD Builds\n\nIf you want to load a minified UMD build directly in the browser you can use one of the popular npm\nCDNs:\n\n```html\n<script src=\"https://unpkg.com/uuid@latest/dist/umd/uuidv4.min.js\"></script>\n<script>\n  alert(uuidv4());\n</script>\n```\n\nor\n\n```html\n<script src=\"https://cdn.jsdelivr.net/npm/uuid@latest/dist/umd/uuidv4.min.js\"></script>\n<script>\n  alert(uuidv4());\n</script>\n```\n\nAvailable bundles:\n\n- https://unpkg.com/uuid@latest/dist/umd/\n- https://cdn.jsdelivr.net/npm/uuid@latest/dist/umd/\n\n## \"getRandomValues() not supported\"\n\nThis error occurs in environments where the standard\n[`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues)\nAPI is not supported. This issue can be resolved by adding an appropriate polyfill:\n\n| Environment  | Suggested Polyfill                                                                                  |\n| ------------ | --------------------------------------------------------------------------------------------------- |\n| React Native | [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme) |\n\n## Upgrading From uuid\\@3\n\n\"_Wait... what happened to uuid\\@4 - uuid\\@6?!?_\"\n\nIn order to avoid confusion with RFC [version 4](#version-4-random) and [version\n5](#version-5-namespace) UUIDs, and a possible [version\n6](http://gh.peabody.io/uuidv6/), releases 4 thru 6 of this module have been\nskipped. Hence, how we're now at uuid\\@7.\n\n### Deep Requires Now Deprecated\n\nuuid\\@3 encouraged the use of deep requires to minimize the bundle size of\nbrowser builds:\n\n```javascript\nconst uuidv4 = require('uuid/v4'); // <== NOW DEPRECATED!\nuuidv4();\n```\n\nAs of uuid\\@7 this library now provides ECMAScript modules builds, which allow\npackagers like Webpack and Rollup to do \"tree-shaking\" to remove dead code.\nInstead, use the `import` syntax:\n\n```javascript\nimport { v4 as uuidv4 } from 'uuid';\nuuidv4();\n```\n\n... or for CommonJS:\n\n```javascript\nconst { v4: uuidv4 } = require('uuid');\nuuidv4();\n```\n\n### Default Export Removed\n\nuuid\\@3 was exporting the Version 4 UUID method as a default export:\n\n```javascript\nconst uuid = require('uuid'); // <== REMOVED!\n```\n\nThis usage pattern was already discouraged in uuid\\@3 and has been removed in uuid\\@7.\n\n----\nMarkdown generated from [README_js.md](README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd)","browser":{"./dist/md5.js":"./dist/md5-browser.js","./dist/rng.js":"./dist/rng-browser.js","./dist/sha1.js":"./dist/sha1-browser.js","./dist/esm-node/index.js":"./dist/esm-browser/index.js"},"gitHead":"0da6efbc703a93236087ff55cd9087d2dcdff155","scripts":{"ci":"npm run lint && npm run test && npm run prettier:check && npm run docs:diff && npm run bundlewatch","md":"runmd --watch --output=README.md README_js.md","docs":"( node --version | grep -q 'v12' ) && ( npm run build && runmd --output=README.md README_js.md )","lint":"npm run eslint:check && npm run prettier:check","test":"BABEL_ENV=commonjs node --throw-deprecation node_modules/.bin/jest test/unit/","build":"./scripts/build.sh","pretest":"npm run build","release":"standard-version --no-verify","docs:diff":"( node --version | grep -vq 'v12' ) || ( npm run docs && git diff --quiet README.md )","eslint:fix":"eslint --fix src/ test/ examples/ *.js","bundlewatch":"( node --version | grep -vq 'v12' ) || ( npm run pretest:browser && CI_REPO_OWNER=uuidjs CI_REPO_NAME=uuid CI_COMMIT_SHA=$GITHUB_SHA CI_BRANCH=${GITHUB_REF##refs/heads/} bundlewatch --config bundlewatch.config.json )","eslint:check":"eslint src/ test/ examples/ *.js","prettier:fix":"prettier --ignore-path .prettierignore --write '**/*.{js,jsx,json,md}'","test:browser":"BABEL_ENV=commonjs jest --forceExit --verbose test/browser/${BROWSER:-}*","prettier:check":"prettier --ignore-path .prettierignore --check '**/*.{js,jsx,json,md}'","pretest:browser":"npm run build && npm-run-all --parallel examples:**","examples:browser-rollup:build":"cd examples/browser-rollup && npm install && npm run build","examples:browser-webpack:build":"cd examples/browser-webpack && npm install && npm run build","examples:browser-esmodules:build":"cd examples/browser-esmodules && npm install && npm run build"},"_npmUser":{"name":"ctavan","email":"dev@tavan.de"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/uuidjs/uuid.git","type":"git"},"_npmVersion":"6.13.4","description":"RFC4122 (v1, v4, and v5) UUIDs","directories":{},"lint-staged":{"*.{js,jsx}":["eslint --fix"],"*.{js,jsx,json,md}":["prettier --write"]},"sideEffects":false,"_nodeVersion":"12.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"esm":"3.2.25","jest":"25.1.0","husky":"3.0.9","runmd":"1.3.2","eslint":"6.8.0","rollup":"1.31.1","prettier":"1.19.1","@babel/cli":"7.8.4","@babel/core":"7.8.4","bundlewatch":"0.2.5","http-server":"0.12.1","lint-staged":"10.0.7","npm-run-all":"4.1.5","babel-eslint":"10.0.3","@commitlint/cli":"8.3.5","standard-version":"7.1.0","@babel/preset-env":"7.8.4","browserstack-local":"1.4.5","selenium-webdriver":"3.6.0","rollup-plugin-terser":"5.2.0","eslint-config-prettier":"6.10.0","eslint-plugin-prettier":"3.1.2","@rollup/plugin-node-resolve":"7.1.1","@commitlint/config-conventional":"8.3.4","babel-plugin-add-module-exports":"1.0.2"},"standard-version":{"scripts":{"postcommit":"npm run build","postchangelog":"prettier --write CHANGELOG.md"}},"_npmOperationalInternal":{"tmp":"tmp/uuid_7.0.2-beta.0_1583181068234_0.11125894339297981","host":"s3://npm-registry-packages"},"publish_time":1583181068402,"deprecated":"uuid@10 and below is no longer supported.  For ESM codebases, update to uuid@latest.  For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).","_cnpm_publish_time":1583181068402,"dist-tags":{"latest":"14.0.3","legacy-11":"11.1.1","legacy-12":"12.0.1","legacy-13":"13.0.2"}}