{"name":"uuid","version":"7.0.0-beta.0","keywords":["uuid","guid","rfc4122"],"license":"MIT","_id":"uuid@7.0.0-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":"7f2bd91cf896f8f3d8d911d995edd7d66d4c2651","tarball":"http://registry-npm.ywwl.com/uuid/download/uuid-7.0.0-beta.0.tgz","fileCount":36,"integrity":"sha512-Am22LVM3UXB0DTzQAeDSsZwP5eyqjIhmff330hqkxGvIxX8RRrUYLtKJ0eYxiBgjeQdUaMONpBZbJachMShxBw==","signatures":[{"sig":"MEYCIQDEK8JeminS5kvK+FXpwP9qLnE/Pij9kySPBNdZsTysIAIhAOlWZ9zLNvwc4qgCDpk5FRxUnkQgtz5Q1MuincsNk5Nv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":68693,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeSngmCRA9TVsSAnZWagAAbkwP/RXJ5KOgqWONL6GrOdrx\nRRzSvg0VlcF8bj18EAg4ZEzWjgyCtLjAKfnjlQkfj1twaxlrrgbHBiYhEzME\nPr/8tUXn6/Hix13r7Zrkw+kJdISFz2acM6u0sgGJZ+ooxgXtwP/Xs2BVVk4k\n5u5cEN9GpyPxUvrDDgE8BPTDoQ1MxTU+4DWRcb57VIki26O44vvNYZGZJteR\nD/+P/oqHWNZ0hy01Ed5yXB3V/u92E3yc7FPKgGTLmmJjAdCRNifBjcEoQT51\n3/RlPkXB/yTza6fwaiVl+DA7FypppthNbo90drJqboS5iE4B/6ZwApSRrnKf\nWnKQDFWl/XWpNjtga+TC5VjN/KQbptheM3Xus0m9KNvmHUna/5svGJBkptqV\n3TSruCViqBaML1yxD1wTiArGacVakAbZRKSbz9XunOMIf8Qq6/unnBIRQDEi\njXbi+tHmGlJ9GzGn/Z4LXf7zwPPZV796LxIfq+TUsEQVrszJ1SRTsUkZ8oMg\nWOz4DwsI6DDU3KDBNiq+FqSfULRF/TwfrcybkfZDNyfXWbFPgk6bF583fN5e\n9l2TNs30eBsoCJiaLkCGnf4oHhUSMJhzTQoV8YyU/zwq+n04jNmP9S2PnkaW\nHZ+NAiAxMdi/y/3hEiaZAaEAQYhu3VVvjjeu6WU18OApWmF6E6idnLyb+A5V\nfXdA\r\n=UYmC\r\n-----END PGP SIGNATURE-----\r\n","size":19637,"noattachment":false,"key":"/uuid/-/uuid-7.0.0-beta.0.tgz"},"main":"dist/index.js","husky":{"hooks":{"commit-msg":"commitlint -E HUSKY_GIT_PARAMS","pre-commit":"lint-staged"}},"module":"dist/esm-browser/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\nSimple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDs.\n\nFeatures:\n\n- Support for version 1, 3, 4 and 5 UUIDs\n- Cross-platform: CommonJS build for Node.js and [ECMAScript Modules](#ecmascript-modules) for the\n  browser.\n- Uses cryptographically-strong random number APIs\n- Zero-dependency, small footprint\n\n⚠️⚠️⚠️ This is the README of the upcoming major version of this library. You can still [access the README\nof the current stable version](https://github.com/uuidjs/uuid/blob/v3.4.0/README.md). ⚠️⚠️⚠️\n\n## Upgrading from v3.x of this Module\n\nIn v3.x of this library we were promoting the use of deep requires to reduce bundlesize for browser\nbuilds:\n\n```javascript\nconst uuidv4 = require('uuid/v4');\nuuidv4();\n```\n\nAs of v7.x this library has been converted to ECMAScript Modules and deep requires are now\ndeprecated and may be removed in a future major version of this library.\n\nSince all modern bundlers like rollup or Webpack support tree-shaking for ECMAScript Modules out of\nthe box we now encourage you to use modern `import` syntax instead, see [ECMAScript Modules /\nESM](#ecmascript-modules--esm):\n\n```javascript\nimport { v4 as uuidv4 } from 'uuid';\nuuidv4();\n```\n\nFor use as CommonJS module with Node.js you can use:\n\n```javascript\nconst { v4: uuidv4 } = require('uuid');\nuuidv4();\n```\n\n## Quickstart - Node.js/CommonJS\n\n```shell\nnpm install uuid\n```\n\nThen generate a random UUID (v4 algorithm), which is almost always what you want ...\n\nVersion 4 (random):\n\n```javascript\nimport { v4 as uuidv4 } from 'uuid';\nuuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'\n```\n\nOr generate UUIDs with other algorithms of your choice ...\n\nVersion 1 (timestamp):\n\n```javascript\nimport { v1 as uuidv1 } from 'uuid';\nuuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8b2d-1b9d6bcdbbfd'\n```\n\nVersion 3 (namespace):\n\n```javascript\nimport { v3 as uuidv3 } from 'uuid';\n\n// ... using predefined DNS namespace (for domain names)\nuuidv3('hello.example.com', uuidv3.DNS); // ⇨ '9125a8dc-52ee-365b-a5aa-81b0b3681cf6'\n\n// ... using predefined URL namespace (for, well, URLs)\nuuidv3('http://example.com/hello', uuidv3.URL); // ⇨ 'c6235813-3ba4-3801-ae84-e0a6ebb7d138'\n\n// ... using a custom namespace\n//\n// Note: Custom namespaces should be a UUID string specific to your application!\n// E.g. the one here was generated using this modules `uuid` CLI.\nconst MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341';\nuuidv3('Hello, World!', MY_NAMESPACE); // ⇨ 'e8b5a51d-11c8-3310-a6ab-367563f20686'\n```\n\nVersion 5 (namespace):\n\n```javascript\nimport { v5 as uuidv5 } from 'uuid';\n\n// ... using predefined DNS namespace (for domain names)\nuuidv5('hello.example.com', uuidv5.DNS); // ⇨ 'fdda765f-fc57-5604-a269-52a7df8164ec'\n\n// ... using predefined URL namespace (for, well, URLs)\nuuidv5('http://example.com/hello', uuidv5.URL); // ⇨ '3bbcee75-cecc-5b56-8031-b6641c1ed1f1'\n\n// ... using a custom namespace\n//\n// Note: Custom namespaces should be a UUID string specific to your application!\n// E.g. the one here was generated using this modules `uuid` CLI.\nconst MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341';\nuuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681'\n```\n\n## Supported Platforms\n\n- Node.js: All LTS, i.e. 8.x, 10.x, 12.x\n- Browsers (with bundlers like webpack/rollup):\n  - Chrome: >= 49\n  - Safari: >= 10\n  - Firefox: >= 44\n  - Edge: >= 15\n  - IE: 11\n\n## ECMAScript Modules / ESM\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## 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 v4 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 + Node)\n\n⚠️⚠️⚠️ **Please make sure to check whether you really need the timestamp properties of Version 1 UUIDs\nbefore using them. In many cases, Version 4 random UUIDs are the better choice. [This\nFAQ](https://github.com/tc39/proposal-uuid#faq) covers more details.** ⚠️⚠️⚠️\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 v1 (timestamp-based) 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 3 (Namespace)\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 v3 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### 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 v5 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## Command Line\n\nUUIDs can be generated from the command line with the `uuid` command.\n\n```shell\n$ uuid\nddeb27fb-d9a0-4624-be4d-4615062daed4\n\n$ uuid v1\n02d37060-d446-11e7-a9fa-7bdae751ebe1\n```\n\nType `uuid --help` for usage details\n\n## UMD Build\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----\nMarkdown generated from [README_js.md](README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd)","gitHead":"522e44c055871493303ec0158dac75d7ce1eba5b","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.15.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"esm":"3.2.25","jest":"24.9.0","husky":"3.0.9","runmd":"1.3.2","eslint":"6.8.0","rollup":"1.30.0","prettier":"1.19.1","@babel/cli":"7.8.3","@babel/core":"7.8.3","bundlewatch":"0.2.5","http-server":"0.12.1","lint-staged":"10.0.1","npm-run-all":"4.1.5","babel-eslint":"10.0.3","@commitlint/cli":"8.3.5","standard-version":"7.0.1","@babel/preset-env":"7.8.3","browserstack-local":"1.4.4","selenium-webdriver":"3.6.0","rollup-plugin-terser":"5.2.0","eslint-config-prettier":"6.9.0","eslint-plugin-prettier":"3.1.2","@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.0-beta.0_1581938725845_0.7896196061229703","host":"s3://npm-registry-packages"},"publish_time":1581938725965,"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":1581938725965,"dist-tags":{"latest":"14.0.3","legacy-11":"11.1.1","legacy-12":"12.0.1","legacy-13":"13.0.2"}}