{"_id":"@aeternity/uuid","_rev":"9-181566ed73b47e40203b1d930769da4e","name":"@aeternity/uuid","dist-tags":{"latest":"0.0.1","beta":"0.0.2"},"versions":{"0.0.1":{"name":"@aeternity/uuid","version":"0.0.1","keywords":["uuid","guid","rfc4122"],"license":"MIT","_id":"@aeternity/uuid@0.0.1","maintainers":[{"name":"thepiwo","email":"piwo.mail@googlemail.com"},{"name":"dincho","email":"npm@xbuv.com"},{"name":"davidyuk","email":"denis_davidyuk@hotmail.com"},{"name":"mradkov","email":"milenradkov@me.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":"f02f772730a9ef26c5f74d92390105c0b1b319b3","tarball":"https://registry.npmjs.org/@aeternity/uuid/-/uuid-0.0.1.tgz","fileCount":71,"integrity":"sha512-ecE01IM9ZJwN27v6rlB0fKZVk4j8vOlcBj1/VdtF+rb5Kfy65H+QyHL1laNM84vRdz484UvxwrG/SXHYeA3IkQ==","signatures":[{"sig":"MEYCIQCxCjtBr1bZyZ0lN8GAsC//lm9F2eo9tyE3mgahJ1HfCAIhAP+PiKDdUSLVhHsUojE6CyVib7OPA4OI7HnVEtEyn/DC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":118166,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJiA+hnCRA9TVsSAnZWagAAn4IP/0Irlfn/aELIoUn91BmX\n54sd5hDeue2hw/nTiZ4LpAK+TsopbpT/YivEZ79rXX3wh8okpywk5Hlqa0J2\nNEnEq+FBobGTuXQzpRo5X9enWNYYjKukd4ODj7T1R8U8gH7XXh1p2OOMKDrZ\n802Ox5scU6BwhEbAOT20xYa+EVpoTUcxa/y4ka+ayUDNQJ4i2W1KuJjGmZvh\nku31mBFx+rKyApRL0ysUGJgOC5YYB9BvoAxuGx+7AGKWlCqeCXq1Y+acJW+A\nfFUi2o9EaNyHCcWhuIjxVRBgarGa2LyfymvOiQnMdYdxR6BdECrFJbO5/l3N\nb1MGg75rqKlPJsf3+dL3zV4Vi5HOcP3maWRiPvLQtAzYE6tkUQM7pyl1paqz\nE4WCgLvwrukvjMYsa6lSiiTyYvSLLPe2yHviSCzh6EpDPFDYgkYHUXJHMC2L\nULwIGyNnhXm/1TtgfyCXoXIICm4sjrkwa13F9xd29zE66v+0dqUOZOsbDOlD\nF0+QvyNMHZVaF0lbdtf3czgfnj7tLJe/N+GIGjT3sLfqNspuVcx5vuMndOkF\nlqsEw+sa4n6/R/Pi+hAIAv4Gc1HYg30XYJNoyecfWvKqu68plvQrvktrqlCn\nkAz1McmZ6KLJ/pfIxv2C3oc4I62tJEY6rhSHolzCw62B5OsQZRRQiYtz95jn\nnLNc\r\n=QiNR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/index","module":"./dist/esm-node/index.js","browser":{"./dist/md5.js":"./dist/md5-browser.js","./dist/rng.js":"./dist/rng-browser.js","./dist/sha1.js":"./dist/sha1-browser.js","./dist/index.mjs":"./dist/esm-browser/index.js","./dist/native.js":"./dist/native-browser.js","./dist/esm-node/index.js":"./dist/esm-browser/index.js"},"exports":{".":{"node":{"import":"./wrapper.mjs","module":"./dist/esm-node/index.js","require":"./dist/index.js"},"default":"./dist/esm-browser/index.js"},"./package.json":"./package.json"},"gitHead":"02ef75445c6d47f16bff8a7d0f50bfbc0cbc3489","scripts":{"md":"runmd --watch --output=README.md README_js.md","docs":"( node --version | grep -q 'v16' ) && ( 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","prepack":"npm run build","prepare":"cd $( git rev-parse --show-toplevel ) && husky install","pretest":"[ -n $CI ] || npm run build","release":"standard-version --no-verify","docs:diff":"npm run docs && git diff --quiet README.md","test:node":"npm-run-all --parallel examples:node:**","test:pack":"./scripts/testpack.sh","eslint:fix":"eslint --fix src/ test/ examples/ *.js","bundlewatch":"npm run pretest:browser && bundlewatch --config bundlewatch.config.json","eslint:check":"eslint src/ test/ examples/ *.js","pretest:node":"npm run build","prettier:fix":"prettier --write '**/*.{js,jsx,json,md}'","test:browser":"wdio run ./wdio.conf.js","prettier:check":"prettier --check '**/*.{js,jsx,json,md}'","test:benchmark":"cd examples/benchmark && npm install && npm test","pretest:browser":"optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**","pretest:benchmark":"npm run build","examples:node:commonjs:test":"cd examples/node-commonjs && npm install && npm test","examples:node:esmodules:test":"cd examples/node-esmodules && npm install && npm test","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"},"_npmUser":{"name":"davidyuk","email":"denis_davidyuk@hotmail.com"},"commitlint":{"extends":["@commitlint/config-conventional"]},"deprecated":"This package is no longer maintained. Migrate to uuid","repository":{"url":"git+https://github.com/uuidjs/uuid.git","type":"git"},"_npmVersion":"8.3.2","description":"RFC4122 (v1, v4, and v5) UUIDs","directories":{},"lint-staged":{"*.{js,jsx}":["eslint --fix"],"*.{js,jsx,json,md}":["prettier --write"]},"sideEffects":false,"_nodeVersion":"16.13.2","_hasShrinkwrap":false,"devDependencies":{"jest":"27.4.2","husky":"7.0.4","runmd":"1.3.2","eslint":"8.3.0","rollup":"2.60.2","prettier":"2.5.0","@babel/cli":"7.16.0","@babel/core":"7.16.0","bundlewatch":"0.3.2","lint-staged":"12.1.2","npm-run-all":"4.1.5","random-seed":"0.3.0","@commitlint/cli":"15.0.0","standard-version":"9.3.2","@babel/preset-env":"7.16.4","eslint-plugin-node":"11.1.0","@babel/eslint-parser":"7.16.3","eslint-plugin-import":"2.25.3","rollup-plugin-terser":"7.0.2","eslint-plugin-promise":"5.1.1","eslint-config-prettier":"8.3.0","eslint-config-standard":"16.0.3","eslint-plugin-prettier":"4.0.0","optional-dev-dependency":"2.0.1","@rollup/plugin-node-resolve":"13.0.6","@commitlint/config-conventional":"15.0.0"},"standard-version":{"scripts":{"postchangelog":"prettier --write CHANGELOG.md"}},"_npmOperationalInternal":{"tmp":"tmp/uuid_0.0.1_1644423271459_0.2781493900443308","host":"s3://npm-registry-packages"},"optionalDevDependencies":{"@wdio/cli":"7.16.10","@wdio/local-runner":"7.16.10","@wdio/spec-reporter":"7.16.9","@wdio/jasmine-framework":"7.16.6","@wdio/browserstack-service":"7.16.10","@wdio/static-server-service":"7.16.6"}},"0.0.2":{"name":"@aeternity/uuid","version":"0.0.2","keywords":["uuid","guid","rfc4122"],"license":"MIT","_id":"@aeternity/uuid@0.0.2","maintainers":[{"name":"aebot","email":"dincho.todorov@gmail.com"},{"name":"marc0olo","email":"info@walz-consulting.de"},{"name":"thepiwo","email":"piwo.mail@googlemail.com"},{"name":"dincho","email":"npm@xbuv.com"},{"name":"davidyuk","email":"denis_davidyuk@hotmail.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":"ed78d6b251d78f62138b63cbb6048778b240060f","tarball":"https://registry.npmjs.org/@aeternity/uuid/-/uuid-0.0.2.tgz","fileCount":77,"integrity":"sha512-xG+E/bnknFIHAr1d79I+m4a1WPoc0NFT2XTGR5Q7EHbbBJ0OJ8pEfPYrIFx3H6ycqoROhoX1oB560OF86+sSCA==","signatures":[{"sig":"MEUCIQCC3LpJXjqMxaY8VbTcO26ZKNSZYOs5ZADKxnpS9/K2uAIga/vQgXDf3B2Kwe2qzHeWGdkzdeEeAvRjnQKmFO2ZxX0=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":119379,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi84QzACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqEqg/+JpNJruJjCLcwtFdC4wTJW0m7UqI1T4l0pq5OdBOST2hcwlQD\r\nfgj4+RrhchTzJIhCPs/anaYbEGdSwgCAP/mxY4/WMrOWejzvso/YpMuMCWyE\r\nv2JZdP8ZrlIspEN4bkzZjAXJMA3UQuO9J/f64XuKPwj3GXo/q+G4QSOigKQN\r\nFleSS7EUfxCeCU025GoAqoXYNpE/nMfHVwo1CTNVrsVWt2DcD2zqSfNyET0z\r\ncOIm7SfQ6atM4P+RkkcUDZX5r9Y2HER9d/l8hY99M9GbjHzBcaO5ZdmgALb0\r\nkoMddGSOKkgz29s7y+SrKAhsUAzoPhCmLdVqj78YeQOk3nDe0KD+8/WqqCbi\r\niUWrboJHQHHS0dMZFww0ALoSWwgTtp2YeAZQe+9Lpl5mvhiGt0+FWJtFPgGo\r\nCTruu2T/BIhgggC97P95j71ePT+Qz5fgTBdeGqrxpdol0ASJrFOyjmDmszez\r\nSC0cetD81YPtCDwus/4G5pcGT9yXtitakXdDcolZ4hPBAeD99V05FYn47otz\r\nx4M+jyLouPgiHF5CaSEMb61w/cJpy2/yVzkd6tdo2jXdUjZp/Pb9vVDjt+69\r\nbZa8UuDC9Ff38VRt+F+WkENnlRvrB6W1jrJzFBUwIJUr+d3y4YDHzjm7Q9IM\r\nX6DvFvYssI9yeSfxEDVPr5ntK1/OAI+b0OE=\r\n=+Cm/\r\n-----END PGP SIGNATURE-----\r\n"},"main":"./dist/index","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 [![CI](https://github.com/uuidjs/uuid/workflows/CI/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ACI) [![Browser](https://github.com/uuidjs/uuid/workflows/Browser/badge.svg)](https://github.com/uuidjs/uuid/actions?query=workflow%3ABrowser)\n\nFor the creation of [RFC4122](https://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 [CDN builds](#cdn-builds)\n  - Node 10, 12, 14, 16\n  - Chrome, Safari, Firefox, Edge browsers\n  - Webpack and rollup.js module bundlers\n  - [React Native / Expo](#react-native--expo)\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 From `uuid@3`](#upgrading-from-uuid3) for details.\n\n## Quickstart\n\nTo create a random UUID...\n\n**1. Install**\n\n```shell\nnpm install uuid\n```\n\n**2. Create a UUID** (ES6 module syntax)\n\n```javascript\nimport { v4 as uuidv4 } from 'uuid';\nuuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'\n```\n\n... or using CommonJS syntax:\n\n```javascript\nconst { v4: uuidv4 } = require('uuid');\nuuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed'\n```\n\nFor timestamp UUIDs, namespace UUIDs, and other options read on ...\n\n## API Summary\n\n|  |  |  |\n| --- | --- | --- |\n| [`uuid.NIL`](#uuidnil) | The nil UUID string (all zeros) | New in `uuid@8.3` |\n| [`uuid.parse()`](#uuidparsestr) | Convert UUID string to array of bytes | New in `uuid@8.3` |\n| [`uuid.stringify()`](#uuidstringifyarr-offset) | Convert array of bytes to UUID string | New in `uuid@8.3` |\n| [`uuid.v1()`](#uuidv1options-buffer-offset) | Create a version 1 (timestamp) UUID |  |\n| [`uuid.v3()`](#uuidv3name-namespace-buffer-offset) | Create a version 3 (namespace w/ MD5) UUID |  |\n| [`uuid.v4()`](#uuidv4options-buffer-offset) | Create a version 4 (random) UUID |  |\n| [`uuid.v5()`](#uuidv5name-namespace-buffer-offset) | Create a version 5 (namespace w/ SHA-1) UUID |  |\n| [`uuid.validate()`](#uuidvalidatestr) | Test a string to see if it is a valid UUID | New in `uuid@8.3` |\n| [`uuid.version()`](#uuidversionstr) | Detect RFC version of a UUID | New in `uuid@8.3` |\n\n## API\n\n### uuid.NIL\n\nThe nil UUID string (all zeros).\n\nExample:\n\n```javascript\nimport { NIL as NIL_UUID } from 'uuid';\n\nNIL_UUID; // ⇨ '00000000-0000-0000-0000-000000000000'\n```\n\n### uuid.parse(str)\n\nConvert UUID string to array of bytes\n\n|           |                                          |\n| --------- | ---------------------------------------- |\n| `str`     | A valid UUID `String`                    |\n| _returns_ | `Uint8Array[16]`                         |\n| _throws_  | `TypeError` if `str` is not a valid UUID |\n\nNote: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left &Rarr; right order of hex-pairs in UUID strings. As shown in the example below.\n\nExample:\n\n```javascript\nimport { parse as uuidParse } from 'uuid';\n\n// Parse a UUID\nconst bytes = uuidParse('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b');\n\n// Convert to hex strings to show byte order (for documentation purposes)\n[...bytes].map((v) => v.toString(16).padStart(2, '0')); // ⇨ \n  // [\n  //   '6e', 'c0', 'bd', '7f',\n  //   '11', 'c0', '43', 'da',\n  //   '97', '5e', '2a', '8a',\n  //   'd9', 'eb', 'ae', '0b'\n  // ]\n```\n\n### uuid.stringify(arr[, offset])\n\nConvert array of bytes to UUID string\n\n|                |                                                                              |\n| -------------- | ---------------------------------------------------------------------------- |\n| `arr`          | `Array`-like collection of 16 values (starting from `offset`) between 0-255. |\n| [`offset` = 0] | `Number` Starting index in the Array                                         |\n| _returns_      | `String`                                                                     |\n| _throws_       | `TypeError` if a valid UUID string cannot be generated                       |\n\nNote: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left &Rarr; right order of hex-pairs in UUID strings. As shown in the example below.\n\nExample:\n\n```javascript\nimport { stringify as uuidStringify } from 'uuid';\n\nconst uuidBytes = [\n  0x6e, 0xc0, 0xbd, 0x7f, 0x11, 0xc0, 0x43, 0xda, 0x97, 0x5e, 0x2a, 0x8a, 0xd9, 0xeb, 0xae, 0x0b,\n];\n\nuuidStringify(uuidBytes); // ⇨ '6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'\n```\n\n### uuid.v1([options[, buffer[, offset]]])\n\nCreate an RFC version 1 (timestamp) UUID\n\n|  |  |\n| --- | --- |\n| [`options`] | `Object` with one or more of the following properties: |\n| [`options.node` ] | RFC \"node\" field as an `Array[6]` of byte values (per 4.1.6) |\n| [`options.clockseq`] | RFC \"clock sequence\" as a `Number` between 0 - 0x3fff |\n| [`options.msecs`] | RFC \"timestamp\" field (`Number` of milliseconds, unix epoch) |\n| [`options.nsecs`] | RFC \"timestamp\" field (`Number` of nanseconds to add to `msecs`, should be 0-10,000) |\n| [`options.random`] | `Array` of 16 random bytes (0-255) |\n| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) |\n| [`buffer`] | `Array \\| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` |\n| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` |\n| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` |\n| _throws_ | `Error` if more than 10M UUIDs/sec are requested |\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\nNote: `options.random` and `options.rng` are only meaningful on the very first call to `v1()`, where they may be passed to initialize the internal `node` and `clockseq` fields.\n\nExample:\n\n```javascript\nimport { v1 as uuidv1 } from 'uuid';\n\nuuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d'\n```\n\nExample using `options`:\n\n```javascript\nimport { v1 as uuidv1 } from 'uuid';\n\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\n### uuid.v3(name, namespace[, buffer[, offset]])\n\nCreate an RFC version 3 (namespace w/ MD5) UUID\n\nAPI is identical to `v5()`, but uses \"v3\" instead.\n\n&#x26a0;&#xfe0f; Note: Per the RFC, \"_If backward compatibility is not an issue, SHA-1 [Version 5] is preferred_.\"\n\n### uuid.v4([options[, buffer[, offset]]])\n\nCreate an RFC version 4 (random) UUID\n\n|  |  |\n| --- | --- |\n| [`options`] | `Object` with one or more of the following properties: |\n| [`options.random`] | `Array` of 16 random bytes (0-255) |\n| [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) |\n| [`buffer`] | `Array \\| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` |\n| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` |\n| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` |\n\nExample:\n\n```javascript\nimport { v4 as uuidv4 } from 'uuid';\n\nuuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed'\n```\n\nExample using predefined `random` values:\n\n```javascript\nimport { v4 as uuidv4 } from 'uuid';\n\nconst v4options = {\n  random: [\n    0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36,\n  ],\n};\nuuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836'\n```\n\n### uuid.v5(name, namespace[, buffer[, offset]])\n\nCreate an RFC version 5 (namespace w/ SHA-1) UUID\n\n|  |  |\n| --- | --- |\n| `name` | `String \\| Array` |\n| `namespace` | `String \\| Array[16]` Namespace UUID |\n| [`buffer`] | `Array \\| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` |\n| [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` |\n| _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` |\n\nNote: The RFC `DNS` and `URL` namespaces are available as `v5.DNS` and `v5.URL`.\n\nExample with custom namespace:\n\n```javascript\nimport { v5 as uuidv5 } from 'uuid';\n\n// Define a custom namespace.  Readers, create your own using something like\n// https://www.uuidgenerator.net/\nconst MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341';\n\nuuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681'\n```\n\nExample with RFC `URL` namespace:\n\n```javascript\nimport { v5 as uuidv5 } from 'uuid';\n\nuuidv5('https://www.w3.org/', uuidv5.URL); // ⇨ 'c106a26a-21bb-5538-8bf2-57095d1976c1'\n```\n\n### uuid.validate(str)\n\nTest a string to see if it is a valid UUID\n\n|           |                                                     |\n| --------- | --------------------------------------------------- |\n| `str`     | `String` to validate                                |\n| _returns_ | `true` if string is a valid UUID, `false` otherwise |\n\nExample:\n\n```javascript\nimport { validate as uuidValidate } from 'uuid';\n\nuuidValidate('not a UUID'); // ⇨ false\nuuidValidate('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ true\n```\n\nUsing `validate` and `version` together it is possible to do per-version validation, e.g. validate for only v4 UUIds.\n\n```javascript\nimport { version as uuidVersion } from 'uuid';\nimport { validate as uuidValidate } from 'uuid';\n\nfunction uuidValidateV4(uuid) {\n  return uuidValidate(uuid) && uuidVersion(uuid) === 4;\n}\n\nconst v1Uuid = 'd9428888-122b-11e1-b85c-61cd3cbb3210';\nconst v4Uuid = '109156be-c4fb-41ea-b1b4-efe1671c5836';\n\nuuidValidateV4(v4Uuid); // ⇨ true\nuuidValidateV4(v1Uuid); // ⇨ false\n```\n\n### uuid.version(str)\n\nDetect RFC version of a UUID\n\n|           |                                          |\n| --------- | ---------------------------------------- |\n| `str`     | A valid UUID `String`                    |\n| _returns_ | `Number` The RFC version of the UUID     |\n| _throws_  | `TypeError` if `str` is not a valid UUID |\n\nExample:\n\n```javascript\nimport { version as uuidVersion } from 'uuid';\n\nuuidVersion('45637ec4-c85f-11ea-87d0-0242ac130003'); // ⇨ 1\nuuidVersion('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ 4\n```\n\n## Command Line\n\nUUIDs can be generated from the command line using `uuid`.\n\n```shell\n$ npx 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```shell\n$ npx 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\nThis library comes with [ECMAScript Modules](https://www.ecma-international.org/ecma-262/6.0/#sec-modules) (ESM) support for Node.js versions that support it ([example](./examples/node-esmodules/)) as well as bundlers like [rollup.js](https://rollupjs.org/guide/en/#tree-shaking) ([example](./examples/browser-rollup/)) and [webpack](https://webpack.js.org/guides/tree-shaking/) ([example](./examples/browser-webpack/)) (targeting both, Node.js and browser environments).\n\n```javascript\nimport { v4 as uuidv4 } from 'uuid';\nuuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed'\n```\n\nTo run the examples you must first create a dist build of this library in the module root:\n\n```shell\nnpm run build\n```\n\n## CDN Builds\n\n### ECMAScript Modules\n\nTo load this module directly into modern browsers that [support loading ECMAScript Modules](https://caniuse.com/#feat=es6-module) you can make use of [jspm](https://jspm.org/):\n\n```html\n<script type=\"module\">\n  import { v4 as uuidv4 } from 'https://jspm.dev/uuid';\n  console.log(uuidv4()); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed'\n</script>\n```\n\n### UMD\n\nAs of `uuid@9` [UMD (Universal Module Definition)](https://github.com/umdjs/umd) builds are no longer shipped with this library.\n\nIf you need a UMD build of this library, use a bundler like Webpack or Rollup. Alternatively, refer to the documentation of [`uuid@8.3.2`](https://github.com/uuidjs/uuid/blob/v8.3.2/README.md#umd) which was the last version that shipped UMD builds.\n\n## Known issues\n\n### Duplicate UUIDs (Googlebot)\n\nThis module may generate duplicate UUIDs when run in clients with _deterministic_ random number generators, such as [Googlebot crawlers](https://developers.google.com/search/docs/advanced/crawling/overview-google-crawlers). This can cause problems for apps that expect client-generated UUIDs to always be unique. Developers should be prepared for this and have a strategy for dealing with possible collisions, such as:\n\n- Check for duplicate UUIDs, fail gracefully\n- Disable write operations for Googlebot clients\n\n### \"getRandomValues() not supported\"\n\nThis error occurs in environments where the standard [`crypto.getRandomValues()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/getRandomValues) API is not supported. This issue can be resolved by adding an appropriate polyfill:\n\n### React Native / Expo\n\n1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme)\n1. Import it _before_ `uuid`. Since `uuid` might also appear as a transitive dependency of some other imports it's safest to just import `react-native-get-random-values` as the very first thing in your entry point:\n\n```javascript\nimport 'react-native-get-random-values';\nimport { v4 as uuidv4 } from 'uuid';\n```\n\nNote: If you are using Expo, you must be using at least `react-native-get-random-values@1.5.0` and `expo@39.0.0`.\n\n### Web Workers / Service Workers (Edge <= 18)\n\n[In Edge <= 18, Web Crypto is not supported in Web Workers or Service Workers](https://caniuse.com/#feat=cryptography) and we are not aware of a polyfill (let us know if you find one, please).\n\n### IE 11 (Internet Explorer)\n\nSupport for IE11 and other legacy browsers has been dropped as of `uuid@9`. If you need to support legacy browsers, you can always transpile the uuid module source yourself (e.g. using [Babel](https://babeljs.io/)).\n\n## Upgrading From `uuid@7`\n\n### Only Named Exports Supported When Using with Node.js ESM\n\n`uuid@7` did not come with native ECMAScript Module (ESM) support for Node.js. Importing it in Node.js ESM consequently imported the CommonJS source with a default export. This library now comes with true Node.js ESM support and only provides named exports.\n\nInstead of doing:\n\n```javascript\nimport uuid from 'uuid';\nuuid.v4();\n```\n\nyou will now have to use the named exports:\n\n```javascript\nimport { v4 as uuidv4 } from 'uuid';\nuuidv4();\n```\n\n### Deep Requires No Longer Supported\n\nDeep requires like `require('uuid/v4')` [which have been deprecated in `uuid@7`](#deep-requires-now-deprecated) are no longer supported.\n\n## Upgrading From `uuid@3`\n\n\"_Wait... what happened to `uuid@4` thru `uuid@6`?!?_\"\n\nIn order to avoid confusion with RFC [version 4](#uuidv4options-buffer-offset) and [version 5](#uuidv5name-namespace-buffer-offset) UUIDs, and a possible [version 6](http://gh.peabody.io/uuidv6/), releases 4 thru 6 of this module have been skipped.\n\n### Deep Requires Now Deprecated\n\n`uuid@3` encouraged the use of deep requires to minimize the bundle size of browser 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 packagers like Webpack and Rollup to do \"tree-shaking\" to remove dead code. Instead, 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\n`uuid@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](https://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/index.mjs":"./dist/esm-browser/index.js","./dist/native.js":"./dist/native-browser.js","./dist/esm-node/index.js":"./dist/esm-browser/index.js"},"exports":{".":{"node":{"import":"./wrapper.mjs","module":"./dist/esm-node/index.js","require":"./dist/index.js"},"browser":{"import":"./dist/esm-browser/index.js","require":"./dist/commonjs-browser/index.js"},"default":"./dist/esm-browser/index.js"},"./package.json":"./package.json"},"gitHead":"d27a2c57c75fc5c7ffef317155692f0e42f2d628","scripts":{"md":"runmd --watch --output=README.md README_js.md","docs":"( node --version | grep -q 'v16' ) && ( npm run build && runmd --output=README.md README_js.md )","lint":"npm run eslint:check && npm run prettier:check","test":"BABEL_ENV=commonjsNode node --throw-deprecation node_modules/.bin/jest test/unit/","build":"./scripts/build.sh","prepack":"npm run build","prepare":"cd $( git rev-parse --show-toplevel ) && husky install","pretest":"[ -n $CI ] || npm run build","release":"standard-version --no-verify","docs:diff":"npm run docs && git diff --quiet README.md","test:node":"npm-run-all --parallel examples:node:**","test:pack":"./scripts/testpack.sh","eslint:fix":"eslint --fix src/ test/ examples/ *.js","bundlewatch":"npm run pretest:browser && bundlewatch --config bundlewatch.config.json","eslint:check":"eslint src/ test/ examples/ *.js","pretest:node":"npm run build","prettier:fix":"prettier --write '**/*.{js,jsx,json,md}'","test:browser":"wdio run ./wdio.conf.js","prettier:check":"prettier --check '**/*.{js,jsx,json,md}'","test:benchmark":"cd examples/benchmark && npm install && npm test","pretest:browser":"optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**","pretest:benchmark":"npm run build","examples:node:jest:test":"cd examples/node-jest && npm install && npm test","examples:node:commonjs:test":"cd examples/node-commonjs && npm install && npm test","examples:node:esmodules:test":"cd examples/node-esmodules && npm install && npm test","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"},"_npmUser":{"name":"davidyuk","email":"denis_davidyuk@hotmail.com"},"commitlint":{"extends":["@commitlint/config-conventional"]},"repository":{"url":"git+https://github.com/uuidjs/uuid.git","type":"git"},"_npmVersion":"8.10.0","description":"RFC4122 (v1, v4, and v5) UUIDs","directories":{},"lint-staged":{"*.{js,jsx}":["eslint --fix"],"*.{js,jsx,json,md}":["prettier --write"]},"sideEffects":false,"_nodeVersion":"16.16.0","_hasShrinkwrap":false,"readmeFilename":"README.md","devDependencies":{"jest":"28.1.3","husky":"8.0.1","runmd":"1.3.6","eslint":"8.21.0","prettier":"2.7.1","@babel/cli":"7.18.10","@babel/core":"7.18.10","bundlewatch":"0.3.3","lint-staged":"13.0.3","npm-run-all":"4.1.5","random-seed":"0.3.0","@commitlint/cli":"17.0.3","standard-version":"9.5.0","@babel/preset-env":"7.18.10","eslint-plugin-node":"11.1.0","@babel/eslint-parser":"7.18.9","eslint-plugin-import":"2.26.0","eslint-plugin-promise":"6.0.0","eslint-config-prettier":"8.5.0","eslint-config-standard":"17.0.0","eslint-plugin-prettier":"4.2.1","optional-dev-dependency":"2.0.1","@commitlint/config-conventional":"17.0.3"},"standard-version":{"scripts":{"postchangelog":"prettier --write CHANGELOG.md"}},"_npmOperationalInternal":{"tmp":"tmp/uuid_0.0.2_1660126259036_0.2016817491749523","host":"s3://npm-registry-packages"},"optionalDevDependencies":{"@wdio/cli":"7.16.10","@wdio/local-runner":"7.16.10","@wdio/spec-reporter":"7.16.9","@wdio/jasmine-framework":"7.16.6","@wdio/browserstack-service":"7.16.10","@wdio/static-server-service":"7.16.6"},"deprecated":"This package is no longer maintained. Migrate to uuid"}},"time":{"created":"2022-02-09T16:14:31.383Z","modified":"2025-04-05T20:50:25.153Z","0.0.1":"2022-02-09T16:14:31.642Z","0.0.2":"2022-08-10T10:10:59.206Z"},"bugs":{"url":"https://github.com/uuidjs/uuid/issues"},"license":"MIT","homepage":"https://github.com/uuidjs/uuid#readme","keywords":["uuid","guid","rfc4122"],"repository":{"url":"git+https://github.com/uuidjs/uuid.git","type":"git"},"description":"RFC4122 (v1, v4, and v5) UUIDs","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"}],"maintainers":[{"name":"aebot","email":"dincho.todorov@gmail.com"},{"name":"davidyuk","email":"denis_davidyuk@hotmail.com"},{"name":"dincho","email":"npm@xbuv.com"},{"name":"hanssv","email":"hanssv@gmail.com"},{"name":"marc0olo","email":"info@walz-consulting.de"},{"name":"thepiwo","email":"piwo.mail@googlemail.com"}],"readme":"","readmeFilename":""}