Changeset e29cc2e for trip-planner-front/node_modules/uuid
- Timestamp:
- 11/25/21 22:08:24 (3 years ago)
- Branches:
- master
- Children:
- 8d391a1
- Parents:
- 59329aa
- Location:
- trip-planner-front/node_modules/uuid
- Files:
-
- 4 edited
- 15 moved
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/node_modules/uuid/CHANGELOG.md
r59329aa re29cc2e 3 3 All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. 4 4 5 ### [8.3.2](https://github.com/uuidjs/uuid/compare/v8.3.1...v8.3.2) (2020-12-08) 5 ## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16) 6 7 8 ### Features 9 10 * rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338) 11 12 ### [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19) 13 14 <a name="3.3.2"></a> 15 ## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28) 16 6 17 7 18 ### Bug Fixes 8 19 9 - lazy load getRandomValues ([#537](https://github.com/uuidjs/uuid/issues/537)) ([16c8f6d](https://github.com/uuidjs/uuid/commit/16c8f6df2f6b09b4d6235602d6a591188320a82e)), closes [#536](https://github.com/uuidjs/uuid/issues/536)20 * typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877)) 10 21 11 ### [8.3.1](https://github.com/uuidjs/uuid/compare/v8.3.0...v8.3.1) (2020-10-04) 22 23 24 <a name="3.3.1"></a> 25 ## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28) 26 12 27 13 28 ### Bug Fixes 14 29 15 - support expo>=39.0.0 ([#515](https://github.com/uuidjs/uuid/issues/515)) ([c65a0f3](https://github.com/uuidjs/uuid/commit/c65a0f3fa73b901959d638d1e3591dfacdbed867)), closes [#375](https://github.com/uuidjs/uuid/issues/375)30 * fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2)) 16 31 17 ## [8.3.0](https://github.com/uuidjs/uuid/compare/v8.2.0...v8.3.0) (2020-07-27) 32 33 34 <a name="3.3.0"></a> 35 # [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22) 36 37 38 ### Bug Fixes 39 40 * assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc)) 41 * fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4)) 42 * Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331)) 43 * mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c)) 18 44 19 45 ### Features 20 46 21 - add parse/stringify/validate/version/NIL APIs ([#479](https://github.com/uuidjs/uuid/issues/479)) ([0e6c10b](https://github.com/uuidjs/uuid/commit/0e6c10ba1bf9517796ff23c052fc0468eedfd5f4)), closes [#475](https://github.com/uuidjs/uuid/issues/475) [#478](https://github.com/uuidjs/uuid/issues/478) [#480](https://github.com/uuidjs/uuid/issues/480) [#481](https://github.com/uuidjs/uuid/issues/481) [#180](https://github.com/uuidjs/uuid/issues/180)47 * enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182)) 22 48 23 ## [8.2.0](https://github.com/uuidjs/uuid/compare/v8.1.0...v8.2.0) (2020-06-23) 49 50 <a name="3.2.1"></a> 51 ## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16) 52 53 54 ### Bug Fixes 55 56 * use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) 57 58 59 60 <a name="3.2.0"></a> 61 # [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16) 62 63 64 ### Bug Fixes 65 66 * remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824)) 67 * use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b)) 68 24 69 25 70 ### Features 26 71 27 - improve performance of v1 string representation ([#453](https://github.com/uuidjs/uuid/issues/453)) ([0ee0b67](https://github.com/uuidjs/uuid/commit/0ee0b67c37846529c66089880414d29f3ae132d5)) 28 - remove deprecated v4 string parameter ([#454](https://github.com/uuidjs/uuid/issues/454)) ([88ce3ca](https://github.com/uuidjs/uuid/commit/88ce3ca0ba046f60856de62c7ce03f7ba98ba46c)), closes [#437](https://github.com/uuidjs/uuid/issues/437) 29 - support jspm ([#473](https://github.com/uuidjs/uuid/issues/473)) ([e9f2587](https://github.com/uuidjs/uuid/commit/e9f2587a92575cac31bc1d4ae944e17c09756659)) 72 * Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726)) 30 73 31 ### Bug Fixes32 33 - prepare package exports for webpack 5 ([#468](https://github.com/uuidjs/uuid/issues/468)) ([8d6e6a5](https://github.com/uuidjs/uuid/commit/8d6e6a5f8965ca9575eb4d92e99a43435f4a58a8))34 35 ## [8.1.0](https://github.com/uuidjs/uuid/compare/v8.0.0...v8.1.0) (2020-05-20)36 37 ### Features38 39 - improve v4 performance by reusing random number array ([#435](https://github.com/uuidjs/uuid/issues/435)) ([bf4af0d](https://github.com/uuidjs/uuid/commit/bf4af0d711b4d2ed03d1f74fd12ad0baa87dc79d))40 - optimize V8 performance of bytesToUuid ([#434](https://github.com/uuidjs/uuid/issues/434)) ([e156415](https://github.com/uuidjs/uuid/commit/e156415448ec1af2351fa0b6660cfb22581971f2))41 42 ### Bug Fixes43 44 - export package.json required by react-native and bundlers ([#449](https://github.com/uuidjs/uuid/issues/449)) ([be1c8fe](https://github.com/uuidjs/uuid/commit/be1c8fe9a3206c358e0059b52fafd7213aa48a52)), closes [ai/nanoevents#44](https://github.com/ai/nanoevents/issues/44#issuecomment-602010343) [#444](https://github.com/uuidjs/uuid/issues/444)45 46 ## [8.0.0](https://github.com/uuidjs/uuid/compare/v7.0.3...v8.0.0) (2020-04-29)47 48 ### ⚠ BREAKING CHANGES49 50 - For native ECMAScript Module (ESM) usage in Node.js only named exports are exposed, there is no more default export.51 52 ```diff53 -import uuid from 'uuid';54 -console.log(uuid.v4()); // -> 'cd6c3b08-0adc-4f4b-a6ef-36087a1c9869'55 +import { v4 as uuidv4 } from 'uuid';56 +uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'57 ```58 59 - Deep requiring specific algorithms of this library like `require('uuid/v4')`, which has been deprecated in `uuid@7`, is no longer supported.60 61 Instead use the named exports that this module exports.62 63 For ECMAScript Modules (ESM):64 65 ```diff66 -import uuidv4 from 'uuid/v4';67 +import { v4 as uuidv4 } from 'uuid';68 uuidv4();69 ```70 71 For CommonJS:72 73 ```diff74 -const uuidv4 = require('uuid/v4');75 +const { v4: uuidv4 } = require('uuid');76 uuidv4();77 ```78 79 ### Features80 81 - native Node.js ES Modules (wrapper approach) ([#423](https://github.com/uuidjs/uuid/issues/423)) ([2d9f590](https://github.com/uuidjs/uuid/commit/2d9f590ad9701d692625c07ed62f0a0f91227991)), closes [#245](https://github.com/uuidjs/uuid/issues/245) [#419](https://github.com/uuidjs/uuid/issues/419) [#342](https://github.com/uuidjs/uuid/issues/342)82 - remove deep requires ([#426](https://github.com/uuidjs/uuid/issues/426)) ([daf72b8](https://github.com/uuidjs/uuid/commit/daf72b84ceb20272a81bb5fbddb05dd95922cbba))83 84 ### Bug Fixes85 86 - add CommonJS syntax example to README quickstart section ([#417](https://github.com/uuidjs/uuid/issues/417)) ([e0ec840](https://github.com/uuidjs/uuid/commit/e0ec8402c7ad44b7ef0453036c612f5db513fda0))87 88 ### [7.0.3](https://github.com/uuidjs/uuid/compare/v7.0.2...v7.0.3) (2020-03-31)89 90 ### Bug Fixes91 92 - make deep require deprecation warning work in browsers ([#409](https://github.com/uuidjs/uuid/issues/409)) ([4b71107](https://github.com/uuidjs/uuid/commit/4b71107d8c0d2ef56861ede6403fc9dc35a1e6bf)), closes [#408](https://github.com/uuidjs/uuid/issues/408)93 94 ### [7.0.2](https://github.com/uuidjs/uuid/compare/v7.0.1...v7.0.2) (2020-03-04)95 96 ### Bug Fixes97 98 - make access to msCrypto consistent ([#393](https://github.com/uuidjs/uuid/issues/393)) ([8bf2a20](https://github.com/uuidjs/uuid/commit/8bf2a20f3565df743da7215eebdbada9d2df118c))99 - simplify link in deprecation warning ([#391](https://github.com/uuidjs/uuid/issues/391)) ([bb2c8e4](https://github.com/uuidjs/uuid/commit/bb2c8e4e9f4c5f9c1eaaf3ea59710c633cd90cb7))100 - update links to match content in readme ([#386](https://github.com/uuidjs/uuid/issues/386)) ([44f2f86](https://github.com/uuidjs/uuid/commit/44f2f86e9d2bbf14ee5f0f00f72a3db1292666d4))101 102 ### [7.0.1](https://github.com/uuidjs/uuid/compare/v7.0.0...v7.0.1) (2020-02-25)103 104 ### Bug Fixes105 106 - clean up esm builds for node and browser ([#383](https://github.com/uuidjs/uuid/issues/383)) ([59e6a49](https://github.com/uuidjs/uuid/commit/59e6a49e7ce7b3e8fb0f3ee52b9daae72af467dc))107 - provide browser versions independent from module system ([#380](https://github.com/uuidjs/uuid/issues/380)) ([4344a22](https://github.com/uuidjs/uuid/commit/4344a22e7aed33be8627eeaaf05360f256a21753)), closes [#378](https://github.com/uuidjs/uuid/issues/378)108 109 ## [7.0.0](https://github.com/uuidjs/uuid/compare/v3.4.0...v7.0.0) (2020-02-24)110 111 ### ⚠ BREAKING CHANGES112 113 - The default export, which used to be the v4() method but which was already discouraged in v3.x of this library, has been removed.114 - Explicitly note that deep imports of the different uuid version functions are deprecated and no longer encouraged and that ECMAScript module named imports should be used instead. Emit a deprecation warning for people who deep-require the different algorithm variants.115 - Remove builtin support for insecure random number generators in the browser. Users who want that will have to supply their own random number generator function.116 - Remove support for generating v3 and v5 UUIDs in Node.js<4.x117 - Convert code base to ECMAScript Modules (ESM) and release CommonJS build for node and ESM build for browser bundlers.118 119 ### Features120 121 - add UMD build to npm package ([#357](https://github.com/uuidjs/uuid/issues/357)) ([4e75adf](https://github.com/uuidjs/uuid/commit/4e75adf435196f28e3fbbe0185d654b5ded7ca2c)), closes [#345](https://github.com/uuidjs/uuid/issues/345)122 - add various es module and CommonJS examples ([b238510](https://github.com/uuidjs/uuid/commit/b238510bf352463521f74bab175a3af9b7a42555))123 - ensure that docs are up-to-date in CI ([ee5e77d](https://github.com/uuidjs/uuid/commit/ee5e77db547474f5a8f23d6c857a6d399209986b))124 - hybrid CommonJS & ECMAScript modules build ([a3f078f](https://github.com/uuidjs/uuid/commit/a3f078faa0baff69ab41aed08e041f8f9c8993d0))125 - remove insecure fallback random number generator ([3a5842b](https://github.com/uuidjs/uuid/commit/3a5842b141a6e5de0ae338f391661e6b84b167c9)), closes [#173](https://github.com/uuidjs/uuid/issues/173)126 - remove support for pre Node.js v4 Buffer API ([#356](https://github.com/uuidjs/uuid/issues/356)) ([b59b5c5](https://github.com/uuidjs/uuid/commit/b59b5c5ecad271c5453f1a156f011671f6d35627))127 - rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([c37a518](https://github.com/uuidjs/uuid/commit/c37a518e367ac4b6d0aa62dba1bc6ce9e85020f7)), closes [#338](https://github.com/uuidjs/uuid/issues/338)128 129 ### Bug Fixes130 131 - add deep-require proxies for local testing and adjust tests ([#365](https://github.com/uuidjs/uuid/issues/365)) ([7fedc79](https://github.com/uuidjs/uuid/commit/7fedc79ac8fda4bfd1c566c7f05ef4ac13b2db48))132 - add note about removal of default export ([#372](https://github.com/uuidjs/uuid/issues/372)) ([12749b7](https://github.com/uuidjs/uuid/commit/12749b700eb49db8a9759fd306d8be05dbfbd58c)), closes [#370](https://github.com/uuidjs/uuid/issues/370)133 - deprecated deep requiring of the different algorithm versions ([#361](https://github.com/uuidjs/uuid/issues/361)) ([c0bdf15](https://github.com/uuidjs/uuid/commit/c0bdf15e417639b1aeb0b247b2fb11f7a0a26b23))134 135 ## [3.4.0](https://github.com/uuidjs/uuid/compare/v3.3.3...v3.4.0) (2020-01-16)136 137 ### Features138 139 - rename repository to github:uuidjs/uuid ([#351](https://github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://github.com/uuidjs/uuid/commit/e2d7314)), closes [#338](https://github.com/uuidjs/uuid/issues/338)140 141 ## [3.3.3](https://github.com/uuidjs/uuid/compare/v3.3.2...v3.3.3) (2019-08-19)142 143 ### Bug Fixes144 145 - no longer run ci tests on node v4146 - upgrade dependencies147 148 ## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28)149 150 ### Bug Fixes151 152 - typo ([305d877](https://github.com/uuidjs/uuid/commit/305d877))153 154 ## [3.3.1](https://github.com/uuidjs/uuid/compare/v3.3.0...v3.3.1) (2018-06-28)155 156 ### Bug Fixes157 158 - fix [#284](https://github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://github.com/uuidjs/uuid/commit/f2a60f2))159 160 # [3.3.0](https://github.com/uuidjs/uuid/compare/v3.2.1...v3.3.0) (2018-06-22)161 162 ### Bug Fixes163 164 - assignment to readonly property to allow running in strict mode ([#270](https://github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://github.com/uuidjs/uuid/commit/d062fdc))165 - fix [#229](https://github.com/uuidjs/uuid/issues/229) ([c9684d4](https://github.com/uuidjs/uuid/commit/c9684d4))166 - Get correct version of IE11 crypto ([#274](https://github.com/uuidjs/uuid/issues/274)) ([153d331](https://github.com/uuidjs/uuid/commit/153d331))167 - mem issue when generating uuid ([#267](https://github.com/uuidjs/uuid/issues/267)) ([c47702c](https://github.com/uuidjs/uuid/commit/c47702c))168 169 ### Features170 171 - enforce Conventional Commit style commit messages ([#282](https://github.com/uuidjs/uuid/issues/282)) ([cc9a182](https://github.com/uuidjs/uuid/commit/cc9a182))172 173 ## [3.2.1](https://github.com/uuidjs/uuid/compare/v3.2.0...v3.2.1) (2018-01-16)174 175 ### Bug Fixes176 177 - use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b))178 179 # [3.2.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.2.0) (2018-01-16)180 181 ### Bug Fixes182 183 - remove mistakenly added typescript dependency, rollback version (standard-version will auto-increment) ([09fa824](https://github.com/uuidjs/uuid/commit/09fa824))184 - use msCrypto if available. Fixes [#241](https://github.com/uuidjs/uuid/issues/241) ([#247](https://github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://github.com/uuidjs/uuid/commit/1fef18b))185 186 ### Features187 188 - Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726))189 74 190 75 # [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17) … … 192 77 ### Bug Fixes 193 78 194 -(fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183)195 -Fix typo (#178)196 -Simple typo fix (#165)79 * (fix) Add .npmignore file to exclude test/ and other non-essential files from packing. (#183) 80 * Fix typo (#178) 81 * Simple typo fix (#165) 197 82 198 83 ### Features 84 * v5 support in CLI (#197) 85 * V5 support (#188) 199 86 200 - v5 support in CLI (#197)201 - V5 support (#188)202 87 203 88 # 3.0.1 (2016-11-28) 204 89 205 - split uuid versions into separate files 90 * split uuid versions into separate files 91 206 92 207 93 # 3.0.0 (2016-11-17) 208 94 209 - remove .parse and .unparse 95 * remove .parse and .unparse 96 210 97 211 98 # 2.0.0 212 99 213 - Removed uuid.BufferClass 100 * Removed uuid.BufferClass 101 214 102 215 103 # 1.4.0 216 104 217 - Improved module context detection 218 - Removed public RNG functions 105 * Improved module context detection 106 * Removed public RNG functions 107 219 108 220 109 # 1.3.2 221 110 222 - Improve tests and handling of v1() options (Issue #24) 223 - Expose RNG option to allow for perf testing with different generators 111 * Improve tests and handling of v1() options (Issue #24) 112 * Expose RNG option to allow for perf testing with different generators 113 224 114 225 115 # 1.3.0 226 116 227 -Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!228 -Support for node.js crypto API229 -De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code117 * Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)! 118 * Support for node.js crypto API 119 * De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code -
trip-planner-front/node_modules/uuid/LICENSE.md
r59329aa re29cc2e 1 1 The MIT License (MIT) 2 2 3 Copyright (c) 2010-20 20Robert Kieffer and other contributors3 Copyright (c) 2010-2016 Robert Kieffer and other contributors 4 4 5 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 5 Permission is hereby granted, free of charge, to any person obtaining a copy 6 of this software and associated documentation files (the "Software"), to deal 7 in the Software without restriction, including without limitation the rights 8 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 copies of the Software, and to permit persons to whom the Software is 10 furnished to do so, subject to the following conditions: 6 11 7 The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 12 The above copyright notice and this permission notice shall be included in all 13 copies or substantial portions of the Software. 8 14 9 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 15 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 SOFTWARE. -
trip-planner-front/node_modules/uuid/README.md
r59329aa re29cc2e 3 3 --> 4 4 5 # 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) 6 7 For the creation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDs 8 9 - **Complete** - Support for RFC4122 version 1, 3, 4, and 5 UUIDs 10 - **Cross-platform** - Support for ... 11 - CommonJS, [ECMAScript Modules](#ecmascript-modules) and [CDN builds](#cdn-builds) 12 - Node 8, 10, 12, 14 13 - Chrome, Safari, Firefox, Edge, IE 11 browsers 14 - Webpack and rollup.js module bundlers 15 - [React Native / Expo](#react-native--expo) 16 - **Secure** - Cryptographically-strong random values 17 - **Small** - Zero-dependency, small footprint, plays nice with "tree shaking" packagers 18 - **CLI** - Includes the [`uuid` command line](#command-line) utility 19 20 **Upgrading from `uuid@3.x`?** Your code is probably okay, but check out [Upgrading From `uuid@3.x`](#upgrading-from-uuid3x) for details. 21 22 ## Quickstart 23 24 To create a random UUID... 25 26 **1. Install** 5 # uuid [![Build Status](https://secure.travis-ci.org/kelektiv/node-uuid.svg?branch=master)](http://travis-ci.org/kelektiv/node-uuid) # 6 7 Simple, fast generation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDS. 8 9 Features: 10 11 * Support for version 1, 3, 4 and 5 UUIDs 12 * Cross-platform 13 * Uses cryptographically-strong random number APIs (when available) 14 * Zero-dependency, small footprint (... but not [this small](https://gist.github.com/982883)) 15 16 [**Deprecation warning**: The use of `require('uuid')` is deprecated and will not be 17 supported after version 3.x of this module. Instead, use `require('uuid/[v1|v3|v4|v5]')` as shown in the examples below.] 18 19 ## Quickstart - CommonJS (Recommended) 27 20 28 21 ```shell … … 30 23 ``` 31 24 32 **2. Create a UUID** (ES6 module syntax) 33 34 ```javascript 35 import { v4 as uuidv4 } from 'uuid'; 36 uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d' 37 ``` 38 39 ... or using CommonJS syntax: 40 41 ```javascript 42 const { v4: uuidv4 } = require('uuid'); 25 Then generate your uuid version of choice ... 26 27 Version 1 (timestamp): 28 29 ```javascript 30 const uuidv1 = require('uuid/v1'); 31 uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d' 32 33 ``` 34 35 Version 3 (namespace): 36 37 ```javascript 38 const uuidv3 = require('uuid/v3'); 39 40 // ... using predefined DNS namespace (for domain names) 41 uuidv3('hello.example.com', uuidv3.DNS); // ⇨ '9125a8dc-52ee-365b-a5aa-81b0b3681cf6' 42 43 // ... using predefined URL namespace (for, well, URLs) 44 uuidv3('http://example.com/hello', uuidv3.URL); // ⇨ 'c6235813-3ba4-3801-ae84-e0a6ebb7d138' 45 46 // ... using a custom namespace 47 // 48 // Note: Custom namespaces should be a UUID string specific to your application! 49 // E.g. the one here was generated using this modules `uuid` CLI. 50 const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; 51 uuidv3('Hello, World!', MY_NAMESPACE); // ⇨ 'e8b5a51d-11c8-3310-a6ab-367563f20686' 52 53 ``` 54 55 Version 4 (random): 56 57 ```javascript 58 const uuidv4 = require('uuid/v4'); 43 59 uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' 44 ``` 45 46 For timestamp UUIDs, namespace UUIDs, and other options read on ... 47 48 ## API Summary 49 50 | | | | 51 | --- | --- | --- | 52 | [`uuid.NIL`](#uuidnil) | The nil UUID string (all zeros) | New in `uuid@8.3` | 53 | [`uuid.parse()`](#uuidparsestr) | Convert UUID string to array of bytes | New in `uuid@8.3` | 54 | [`uuid.stringify()`](#uuidstringifyarr-offset) | Convert array of bytes to UUID string | New in `uuid@8.3` | 55 | [`uuid.v1()`](#uuidv1options-buffer-offset) | Create a version 1 (timestamp) UUID | | 56 | [`uuid.v3()`](#uuidv3name-namespace-buffer-offset) | Create a version 3 (namespace w/ MD5) UUID | | 57 | [`uuid.v4()`](#uuidv4options-buffer-offset) | Create a version 4 (random) UUID | | 58 | [`uuid.v5()`](#uuidv5name-namespace-buffer-offset) | Create a version 5 (namespace w/ SHA-1) UUID | | 59 | [`uuid.validate()`](#uuidvalidatestr) | Test a string to see if it is a valid UUID | New in `uuid@8.3` | 60 | [`uuid.version()`](#uuidversionstr) | Detect RFC version of a UUID | New in `uuid@8.3` | 60 61 ``` 62 63 Version 5 (namespace): 64 65 ```javascript 66 const uuidv5 = require('uuid/v5'); 67 68 // ... using predefined DNS namespace (for domain names) 69 uuidv5('hello.example.com', uuidv5.DNS); // ⇨ 'fdda765f-fc57-5604-a269-52a7df8164ec' 70 71 // ... using predefined URL namespace (for, well, URLs) 72 uuidv5('http://example.com/hello', uuidv5.URL); // ⇨ '3bbcee75-cecc-5b56-8031-b6641c1ed1f1' 73 74 // ... using a custom namespace 75 // 76 // Note: Custom namespaces should be a UUID string specific to your application! 77 // E.g. the one here was generated using this modules `uuid` CLI. 78 const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; 79 uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' 80 81 ``` 61 82 62 83 ## API 63 84 64 ### uuid.NIL 65 66 The nil UUID string (all zeros). 67 68 Example: 69 70 ```javascript 71 import { NIL as NIL_UUID } from 'uuid'; 72 73 NIL_UUID; // ⇨ '00000000-0000-0000-0000-000000000000' 74 ``` 75 76 ### uuid.parse(str) 77 78 Convert UUID string to array of bytes 79 80 | | | 81 | --------- | ---------------------------------------- | 82 | `str` | A valid UUID `String` | 83 | _returns_ | `Uint8Array[16]` | 84 | _throws_ | `TypeError` if `str` is not a valid UUID | 85 86 Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. 87 88 Example: 89 90 ```javascript 91 import { parse as uuidParse } from 'uuid'; 92 93 // Parse a UUID 94 const bytes = uuidParse('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); 95 96 // Convert to hex strings to show byte order (for documentation purposes) 97 [...bytes].map((v) => v.toString(16).padStart(2, '0')); // ⇨ 98 // [ 99 // '6e', 'c0', 'bd', '7f', 100 // '11', 'c0', '43', 'da', 101 // '97', '5e', '2a', '8a', 102 // 'd9', 'eb', 'ae', '0b' 103 // ] 104 ``` 105 106 ### uuid.stringify(arr[, offset]) 107 108 Convert array of bytes to UUID string 109 110 | | | 111 | -------------- | ---------------------------------------------------------------------------- | 112 | `arr` | `Array`-like collection of 16 values (starting from `offset`) between 0-255. | 113 | [`offset` = 0] | `Number` Starting index in the Array | 114 | _returns_ | `String` | 115 | _throws_ | `TypeError` if a valid UUID string cannot be generated | 116 117 Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left ↠ right order of hex-pairs in UUID strings. As shown in the example below. 118 119 Example: 120 121 ```javascript 122 import { stringify as uuidStringify } from 'uuid'; 123 124 const uuidBytes = [ 125 0x6e, 126 0xc0, 127 0xbd, 128 0x7f, 129 0x11, 130 0xc0, 131 0x43, 132 0xda, 133 0x97, 134 0x5e, 135 0x2a, 136 0x8a, 137 0xd9, 138 0xeb, 139 0xae, 140 0x0b, 141 ]; 142 143 uuidStringify(uuidBytes); // ⇨ '6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b' 144 ``` 145 146 ### uuid.v1([options[, buffer[, offset]]]) 147 148 Create an RFC version 1 (timestamp) UUID 149 150 | | | 151 | --- | --- | 152 | [`options`] | `Object` with one or more of the following properties: | 153 | [`options.node` ] | RFC "node" field as an `Array[6]` of byte values (per 4.1.6) | 154 | [`options.clockseq`] | RFC "clock sequence" as a `Number` between 0 - 0x3fff | 155 | [`options.msecs`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) | 156 | [`options.nsecs`] | RFC "timestamp" field (`Number` of nanseconds to add to `msecs`, should be 0-10,000) | 157 | [`options.random`] | `Array` of 16 random bytes (0-255) | 158 | [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | 159 | [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | 160 | [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | 161 | _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | 162 | _throws_ | `Error` if more than 10M UUIDs/sec are requested | 85 ### Version 1 86 87 ```javascript 88 const uuidv1 = require('uuid/v1'); 89 90 // Incantations 91 uuidv1(); 92 uuidv1(options); 93 uuidv1(options, buffer, offset); 94 ``` 95 96 Generate and return a RFC4122 v1 (timestamp-based) UUID. 97 98 * `options` - (Object) Optional uuid state to apply. Properties may include: 99 100 * `node` - (Array) Node id as Array of 6 bytes (per 4.1.6). Default: Randomly generated ID. See note 1. 101 * `clockseq` - (Number between 0 - 0x3fff) RFC clock sequence. Default: An internally maintained clockseq is used. 102 * `msecs` - (Number) Time in milliseconds since unix Epoch. Default: The current time is used. 103 * `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. 104 105 * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. 106 * `offset` - (Number) Starting index in `buffer` at which to begin writing. 107 108 Returns `buffer`, if specified, otherwise the string form of the UUID 163 109 164 110 Note: 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. 165 111 166 Note: `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. 167 168 Example: 169 170 ```javascript 171 import { v1 as uuidv1 } from 'uuid'; 172 173 uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d' 174 ``` 175 176 Example using `options`: 177 178 ```javascript 179 import { v1 as uuidv1 } from 'uuid'; 180 112 Example: Generate string UUID with fully-specified options 113 114 ```javascript 181 115 const v1options = { 182 116 node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab], 183 117 clockseq: 0x1234, 184 118 msecs: new Date('2011-11-01').getTime(), 185 nsecs: 5678 ,119 nsecs: 5678 186 120 }; 187 121 uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab' 188 ``` 189 190 ### uuid.v3(name, namespace[, buffer[, offset]]) 191 192 Create an RFC version 3 (namespace w/ MD5) UUID 193 194 API is identical to `v5()`, but uses "v3" instead. 195 196 ⚠️ Note: Per the RFC, "_If backward compatibility is not an issue, SHA-1 [Version 5] is preferred_." 197 198 ### uuid.v4([options[, buffer[, offset]]]) 199 200 Create an RFC version 4 (random) UUID 201 202 | | | 203 | --- | --- | 204 | [`options`] | `Object` with one or more of the following properties: | 205 | [`options.random`] | `Array` of 16 random bytes (0-255) | 206 | [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) | 207 | [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | 208 | [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | 209 | _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | 122 123 ``` 124 125 Example: In-place generation of two binary IDs 126 127 ```javascript 128 // Generate two ids in an array 129 const arr = new Array(); 130 uuidv1(null, arr, 0); // ⇨ 131 // [ 132 // 44, 94, 164, 192, 64, 103, 133 // 17, 233, 146, 52, 155, 29, 134 // 235, 77, 59, 125 135 // ] 136 uuidv1(null, arr, 16); // ⇨ 137 // [ 138 // 44, 94, 164, 192, 64, 103, 17, 233, 139 // 146, 52, 155, 29, 235, 77, 59, 125, 140 // 44, 94, 164, 193, 64, 103, 17, 233, 141 // 146, 52, 155, 29, 235, 77, 59, 125 142 // ] 143 144 ``` 145 146 ### Version 3 147 148 ```javascript 149 const uuidv3 = require('uuid/v3'); 150 151 // Incantations 152 uuidv3(name, namespace); 153 uuidv3(name, namespace, buffer); 154 uuidv3(name, namespace, buffer, offset); 155 ``` 156 157 Generate and return a RFC4122 v3 UUID. 158 159 * `name` - (String | Array[]) "name" to create UUID with 160 * `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values 161 * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. 162 * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 163 164 Returns `buffer`, if specified, otherwise the string form of the UUID 210 165 211 166 Example: 212 167 213 168 ```javascript 214 import { v4 as uuidv4 } from 'uuid'; 215 216 uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' 217 ``` 218 219 Example using predefined `random` values: 220 221 ```javascript 222 import { v4 as uuidv4 } from 'uuid'; 223 169 uuidv3('hello world', MY_NAMESPACE); // ⇨ '042ffd34-d989-321c-ad06-f60826172424' 170 171 ``` 172 173 ### Version 4 174 175 ```javascript 176 const uuidv4 = require('uuid/v4') 177 178 // Incantations 179 uuidv4(); 180 uuidv4(options); 181 uuidv4(options, buffer, offset); 182 ``` 183 184 Generate and return a RFC4122 v4 UUID. 185 186 * `options` - (Object) Optional uuid state to apply. Properties may include: 187 * `random` - (Number[16]) Array of 16 numbers (0-255) to use in place of randomly generated values 188 * `rng` - (Function) Random # generator function that returns an Array[16] of byte values (0-255) 189 * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. 190 * `offset` - (Number) Starting index in `buffer` at which to begin writing. 191 192 Returns `buffer`, if specified, otherwise the string form of the UUID 193 194 Example: Generate string UUID with predefined `random` values 195 196 ```javascript 224 197 const v4options = { 225 198 random: [ 226 0x10, 227 0x91, 228 0x56, 229 0xbe, 230 0xc4, 231 0xfb, 232 0xc1, 233 0xea, 234 0x71, 235 0xb4, 236 0xef, 237 0xe1, 238 0x67, 239 0x1c, 240 0x58, 241 0x36, 242 ], 199 0x10, 0x91, 0x56, 0xbe, 0xc4, 0xfb, 0xc1, 0xea, 200 0x71, 0xb4, 0xef, 0xe1, 0x67, 0x1c, 0x58, 0x36 201 ] 243 202 }; 244 203 uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836' 245 ``` 246 247 ### uuid.v5(name, namespace[, buffer[, offset]]) 248 249 Create an RFC version 5 (namespace w/ SHA-1) UUID 250 251 | | | 252 | --- | --- | 253 | `name` | `String \| Array` | 254 | `namespace` | `String \| Array[16]` Namespace UUID | 255 | [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` | 256 | [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` | 257 | _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` | 258 259 Note: The RFC `DNS` and `URL` namespaces are available as `v5.DNS` and `v5.URL`. 260 261 Example with custom namespace: 262 263 ```javascript 264 import { v5 as uuidv5 } from 'uuid'; 265 266 // Define a custom namespace. Readers, create your own using something like 267 // https://www.uuidgenerator.net/ 268 const MY_NAMESPACE = '1b671a64-40d5-491e-99b0-da01ff1f3341'; 269 270 uuidv5('Hello, World!', MY_NAMESPACE); // ⇨ '630eb68f-e0fa-5ecc-887a-7c7a62614681' 271 ``` 272 273 Example with RFC `URL` namespace: 274 275 ```javascript 276 import { v5 as uuidv5 } from 'uuid'; 277 278 uuidv5('https://www.w3.org/', uuidv5.URL); // ⇨ 'c106a26a-21bb-5538-8bf2-57095d1976c1' 279 ``` 280 281 ### uuid.validate(str) 282 283 Test a string to see if it is a valid UUID 284 285 | | | 286 | --------- | --------------------------------------------------- | 287 | `str` | `String` to validate | 288 | _returns_ | `true` if string is a valid UUID, `false` otherwise | 204 205 ``` 206 207 Example: Generate two IDs in a single buffer 208 209 ```javascript 210 const buffer = new Array(); 211 uuidv4(null, buffer, 0); // ⇨ 212 // [ 213 // 155, 29, 235, 77, 59, 214 // 125, 75, 173, 155, 221, 215 // 43, 13, 123, 61, 203, 216 // 109 217 // ] 218 uuidv4(null, buffer, 16); // ⇨ 219 // [ 220 // 155, 29, 235, 77, 59, 125, 75, 173, 221 // 155, 221, 43, 13, 123, 61, 203, 109, 222 // 27, 157, 107, 205, 187, 253, 75, 45, 223 // 155, 93, 171, 141, 251, 189, 75, 237 224 // ] 225 226 ``` 227 228 ### Version 5 229 230 ```javascript 231 const uuidv5 = require('uuid/v5'); 232 233 // Incantations 234 uuidv5(name, namespace); 235 uuidv5(name, namespace, buffer); 236 uuidv5(name, namespace, buffer, offset); 237 ``` 238 239 Generate and return a RFC4122 v5 UUID. 240 241 * `name` - (String | Array[]) "name" to create UUID with 242 * `namespace` - (String | Array[]) "namespace" UUID either as a String or Array[16] of byte values 243 * `buffer` - (Array | Buffer) Array or buffer where UUID bytes are to be written. 244 * `offset` - (Number) Starting index in `buffer` at which to begin writing. Default = 0 245 246 Returns `buffer`, if specified, otherwise the string form of the UUID 289 247 290 248 Example: 291 249 292 250 ```javascript 293 import { validate as uuidValidate } from 'uuid'; 294 295 uuidValidate('not a UUID'); // ⇨ false 296 uuidValidate('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ true 297 ``` 298 299 Using `validate` and `version` together it is possible to do per-version validation, e.g. validate for only v4 UUIds. 300 301 ```javascript 302 import { version as uuidVersion } from 'uuid'; 303 import { validate as uuidValidate } from 'uuid'; 304 305 function uuidValidateV4(uuid) { 306 return uuidValidate(uuid) && uuidVersion(uuid) === 4; 307 } 308 309 const v1Uuid = 'd9428888-122b-11e1-b85c-61cd3cbb3210'; 310 const v4Uuid = '109156be-c4fb-41ea-b1b4-efe1671c5836'; 311 312 uuidValidateV4(v4Uuid); // ⇨ true 313 uuidValidateV4(v1Uuid); // ⇨ false 314 ``` 315 316 ### uuid.version(str) 317 318 Detect RFC version of a UUID 319 320 | | | 321 | --------- | ---------------------------------------- | 322 | `str` | A valid UUID `String` | 323 | _returns_ | `Number` The RFC version of the UUID | 324 | _throws_ | `TypeError` if `str` is not a valid UUID | 325 326 Example: 327 328 ```javascript 329 import { version as uuidVersion } from 'uuid'; 330 331 uuidVersion('45637ec4-c85f-11ea-87d0-0242ac130003'); // ⇨ 1 332 uuidVersion('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ 4 251 uuidv5('hello world', MY_NAMESPACE); // ⇨ '9f282611-e0fd-5650-8953-89c8e342da0b' 252 333 253 ``` 334 254 335 255 ## Command Line 336 256 337 UUIDs can be generated from the command line using `uuid`.257 UUIDs can be generated from the command line with the `uuid` command. 338 258 339 259 ```shell 340 260 $ uuid 341 261 ddeb27fb-d9a0-4624-be4d-4615062daed4 342 ``` 343 344 The default is to generate version 4 UUIDS, however the other versions are supported. Type `uuid --help` for details: 262 263 $ uuid v1 264 02d37060-d446-11e7-a9fa-7bdae751ebe1 265 ``` 266 267 Type `uuid --help` for usage details 268 269 ## Testing 345 270 346 271 ```shell 347 $ uuid --help 348 349 Usage: 350 uuid 351 uuid v1 352 uuid v3 <name> <namespace uuid> 353 uuid v4 354 uuid v5 <name> <namespace uuid> 355 uuid --help 356 357 Note: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs 358 defined by RFC4122 359 ``` 360 361 ## ECMAScript Modules 362 363 This 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). 364 365 ```javascript 366 import { v4 as uuidv4 } from 'uuid'; 367 uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' 368 ``` 369 370 To run the examples you must first create a dist build of this library in the module root: 371 372 ```shell 373 npm run build 374 ``` 375 376 ## CDN Builds 377 378 ### ECMAScript Modules 379 380 To 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/): 381 382 ```html 383 <script type="module"> 384 import { v4 as uuidv4 } from 'https://jspm.dev/uuid'; 385 console.log(uuidv4()); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed' 386 </script> 387 ``` 388 389 ### UMD 390 391 To load this module directly into older browsers you can use the [UMD (Universal Module Definition)](https://github.com/umdjs/umd) builds from any of the following CDNs: 392 393 **Using [UNPKG](https://unpkg.com/uuid@latest/dist/umd/)**: 394 395 ```html 396 <script src="https://unpkg.com/uuid@latest/dist/umd/uuidv4.min.js"></script> 397 ``` 398 399 **Using [jsDelivr](https://cdn.jsdelivr.net/npm/uuid@latest/dist/umd/)**: 400 401 ```html 402 <script src="https://cdn.jsdelivr.net/npm/uuid@latest/dist/umd/uuidv4.min.js"></script> 403 ``` 404 405 **Using [cdnjs](https://cdnjs.com/libraries/uuid)**: 406 407 ```html 408 <script src="https://cdnjs.cloudflare.com/ajax/libs/uuid/8.1.0/uuidv4.min.js"></script> 409 ``` 410 411 These CDNs all provide the same [`uuidv4()`](#uuidv4options-buffer-offset) method: 412 413 ```html 414 <script> 415 uuidv4(); // ⇨ '55af1e37-0734-46d8-b070-a1e42e4fc392' 416 </script> 417 ``` 418 419 Methods for the other algorithms ([`uuidv1()`](#uuidv1options-buffer-offset), [`uuidv3()`](#uuidv3name-namespace-buffer-offset) and [`uuidv5()`](#uuidv5name-namespace-buffer-offset)) are available from the files `uuidv1.min.js`, `uuidv3.min.js` and `uuidv5.min.js` respectively. 420 421 ## "getRandomValues() not supported" 422 423 This 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: 424 425 ### React Native / Expo 426 427 1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme) 428 1. 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: 429 430 ```javascript 431 import 'react-native-get-random-values'; 432 import { v4 as uuidv4 } from 'uuid'; 433 ``` 434 435 Note: If you are using Expo, you must be using at least `react-native-get-random-values@1.5.0` and `expo@39.0.0`. 436 437 ### Web Workers / Service Workers (Edge <= 18) 438 439 [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). 440 441 ## Upgrading From `uuid@7.x` 442 443 ### Only Named Exports Supported When Using with Node.js ESM 444 445 `uuid@7.x` 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. 446 447 Instead of doing: 448 449 ```javascript 450 import uuid from 'uuid'; 451 uuid.v4(); 452 ``` 453 454 you will now have to use the named exports: 455 456 ```javascript 457 import { v4 as uuidv4 } from 'uuid'; 458 uuidv4(); 459 ``` 460 461 ### Deep Requires No Longer Supported 462 463 Deep requires like `require('uuid/v4')` [which have been deprecated in `uuid@7.x`](#deep-requires-now-deprecated) are no longer supported. 464 465 ## Upgrading From `uuid@3.x` 466 467 "_Wait... what happened to `uuid@4.x` - `uuid@6.x`?!?_" 468 469 In 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. 470 471 ### Deep Requires Now Deprecated 472 473 `uuid@3.x` encouraged the use of deep requires to minimize the bundle size of browser builds: 474 475 ```javascript 476 const uuidv4 = require('uuid/v4'); // <== NOW DEPRECATED! 477 uuidv4(); 478 ``` 479 480 As of `uuid@7.x` 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: 481 482 ```javascript 483 import { v4 as uuidv4 } from 'uuid'; 484 uuidv4(); 485 ``` 486 487 ... or for CommonJS: 488 489 ```javascript 490 const { v4: uuidv4 } = require('uuid'); 491 uuidv4(); 492 ``` 493 494 ### Default Export Removed 495 496 `uuid@3.x` was exporting the Version 4 UUID method as a default export: 497 498 ```javascript 499 const uuid = require('uuid'); // <== REMOVED! 500 ``` 501 502 This usage pattern was already discouraged in `uuid@3.x` and has been removed in `uuid@7.x`. 272 npm test 273 ``` 503 274 504 275 ---- -
trip-planner-front/node_modules/uuid/package.json
r59329aa re29cc2e 1 1 { 2 "_args": [ 3 [ 4 "uuid@8.3.2", 5 "C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front" 6 ] 7 ], 8 "_development": true, 9 "_from": "uuid@8.3.2", 10 "_id": "uuid@8.3.2", 2 "_from": "uuid@^3.4.0", 3 "_id": "uuid@3.4.0", 11 4 "_inBundle": false, 12 "_integrity": "sha512- +NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",5 "_integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", 13 6 "_location": "/uuid", 14 7 "_phantomChildren": {}, 15 8 "_requested": { 16 "type": " version",9 "type": "range", 17 10 "registry": true, 18 "raw": "uuid@ 8.3.2",11 "raw": "uuid@^3.4.0", 19 12 "name": "uuid", 20 13 "escapedName": "uuid", 21 "rawSpec": " 8.3.2",14 "rawSpec": "^3.4.0", 22 15 "saveSpec": null, 23 "fetchSpec": " 8.3.2"16 "fetchSpec": "^3.4.0" 24 17 }, 25 18 "_requiredBy": [ 26 "/@angular/cli" 19 "/request", 20 "/sockjs", 21 "/webpack-log" 27 22 ], 28 "_resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", 29 "_spec": "8.3.2", 30 "_where": "C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front", 23 "_resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", 24 "_shasum": "b23e4358afa8a202fe7a100af1f5f883f02007ee", 25 "_spec": "uuid@^3.4.0", 26 "_where": "C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\node_modules\\sockjs", 31 27 "bin": { 32 "uuid": " dist/bin/uuid"28 "uuid": "bin/uuid" 33 29 }, 34 30 "browser": { 35 "./dist/md5.js": "./dist/md5-browser.js", 36 "./dist/rng.js": "./dist/rng-browser.js", 37 "./dist/sha1.js": "./dist/sha1-browser.js", 38 "./dist/esm-node/index.js": "./dist/esm-browser/index.js" 31 "./lib/rng.js": "./lib/rng-browser.js", 32 "./lib/sha1.js": "./lib/sha1-browser.js", 33 "./lib/md5.js": "./lib/md5-browser.js" 39 34 }, 40 35 "bugs": { 41 36 "url": "https://github.com/uuidjs/uuid/issues" 42 37 }, 38 "bundleDependencies": false, 43 39 "commitlint": { 44 40 "extends": [ … … 46 42 ] 47 43 }, 44 "contributors": [ 45 { 46 "name": "Robert Kieffer", 47 "email": "robert@broofa.com" 48 }, 49 { 50 "name": "Christoph Tavan", 51 "email": "dev@tavan.de" 52 }, 53 { 54 "name": "AJ ONeal", 55 "email": "coolaj86@gmail.com" 56 }, 57 { 58 "name": "Vincent Voyer", 59 "email": "vincent@zeroload.net" 60 }, 61 { 62 "name": "Roman Shtylman", 63 "email": "shtylman@gmail.com" 64 } 65 ], 66 "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", 48 67 "description": "RFC4122 (v1, v4, and v5) UUIDs", 49 68 "devDependencies": { 50 "@babel/cli": "7.11.6", 51 "@babel/core": "7.11.6", 52 "@babel/preset-env": "7.11.5", 53 "@commitlint/cli": "11.0.0", 54 "@commitlint/config-conventional": "11.0.0", 55 "@rollup/plugin-node-resolve": "9.0.0", 56 "babel-eslint": "10.1.0", 57 "bundlewatch": "0.3.1", 58 "eslint": "7.10.0", 59 "eslint-config-prettier": "6.12.0", 60 "eslint-config-standard": "14.1.1", 61 "eslint-plugin-import": "2.22.1", 62 "eslint-plugin-node": "11.1.0", 63 "eslint-plugin-prettier": "3.1.4", 64 "eslint-plugin-promise": "4.2.1", 65 "eslint-plugin-standard": "4.0.1", 66 "husky": "4.3.0", 67 "jest": "25.5.4", 68 "lint-staged": "10.4.0", 69 "npm-run-all": "4.1.5", 70 "optional-dev-dependency": "2.0.1", 71 "prettier": "2.1.2", 72 "random-seed": "0.3.0", 73 "rollup": "2.28.2", 74 "rollup-plugin-terser": "7.0.2", 75 "runmd": "1.3.2", 76 "standard-version": "9.0.0" 69 "@commitlint/cli": "~8.2.0", 70 "@commitlint/config-conventional": "~8.2.0", 71 "eslint": "~6.4.0", 72 "husky": "~3.0.5", 73 "mocha": "6.2.0", 74 "runmd": "1.2.1", 75 "standard-version": "7.0.0" 77 76 }, 78 "exports": {79 ".": {80 "node": {81 "module": "./dist/esm-node/index.js",82 "require": "./dist/index.js",83 "import": "./wrapper.mjs"84 },85 "default": "./dist/esm-browser/index.js"86 },87 "./package.json": "./package.json"88 },89 "files": [90 "CHANGELOG.md",91 "CONTRIBUTING.md",92 "LICENSE.md",93 "README.md",94 "dist",95 "wrapper.mjs"96 ],97 77 "homepage": "https://github.com/uuidjs/uuid#readme", 98 78 "husky": { 99 79 "hooks": { 100 "commit-msg": "commitlint -E HUSKY_GIT_PARAMS", 101 "pre-commit": "lint-staged" 80 "commit-msg": "commitlint -E HUSKY_GIT_PARAMS" 102 81 } 103 82 }, … … 108 87 ], 109 88 "license": "MIT", 110 "lint-staged": {111 "*.{js,jsx,json,md}": [112 "prettier --write"113 ],114 "*.{js,jsx}": [115 "eslint --fix"116 ]117 },118 "main": "./dist/index.js",119 "module": "./dist/esm-node/index.js",120 89 "name": "uuid", 121 "optionalDevDependencies": {122 "@wdio/browserstack-service": "6.4.0",123 "@wdio/cli": "6.4.0",124 "@wdio/jasmine-framework": "6.4.0",125 "@wdio/local-runner": "6.4.0",126 "@wdio/spec-reporter": "6.4.0",127 "@wdio/static-server-service": "6.4.0",128 "@wdio/sync": "6.4.0"129 },130 90 "repository": { 131 91 "type": "git", … … 133 93 }, 134 94 "scripts": { 135 "build": "./scripts/build.sh", 136 "bundlewatch": "npm run pretest:browser && bundlewatch --config bundlewatch.config.json", 137 "docs": "( node --version | grep -q 'v12' ) && ( npm run build && runmd --output=README.md README_js.md )", 138 "docs:diff": "npm run docs && git diff --quiet README.md", 139 "eslint:check": "eslint src/ test/ examples/ *.js", 140 "eslint:fix": "eslint --fix src/ test/ examples/ *.js", 141 "examples:browser:rollup:build": "cd examples/browser-rollup && npm install && npm run build", 142 "examples:browser:webpack:build": "cd examples/browser-webpack && npm install && npm run build", 143 "examples:node:commonjs:test": "cd examples/node-commonjs && npm install && npm test", 144 "examples:node:esmodules:test": "cd examples/node-esmodules && npm install && npm test", 145 "lint": "npm run eslint:check && npm run prettier:check", 95 "lint": "eslint .", 146 96 "md": "runmd --watch --output=README.md README_js.md", 147 "prepack": "npm run build", 148 "pretest": "[ -n $CI ] || npm run build", 149 "pretest:benchmark": "npm run build", 150 "pretest:browser": "optional-dev-dependency && npm run build && npm-run-all --parallel examples:browser:**", 151 "pretest:node": "npm run build", 152 "prettier:check": "prettier --ignore-path .prettierignore --check '**/*.{js,jsx,json,md}'", 153 "prettier:fix": "prettier --ignore-path .prettierignore --write '**/*.{js,jsx,json,md}'", 154 "release": "standard-version --no-verify", 155 "test": "BABEL_ENV=commonjs node --throw-deprecation node_modules/.bin/jest test/unit/", 156 "test:benchmark": "cd examples/benchmark && npm install && npm test", 157 "test:browser": "wdio run ./wdio.conf.js", 158 "test:node": "npm-run-all --parallel examples:node:**", 159 "test:pack": "./scripts/testpack.sh" 97 "prepare": "runmd --output=README.md README_js.md", 98 "release": "standard-version", 99 "test": "npm run lint && mocha test/test.js" 160 100 }, 161 "sideEffects": false, 162 "standard-version": { 163 "scripts": { 164 "postchangelog": "prettier --write CHANGELOG.md" 165 } 166 }, 167 "version": "8.3.2" 101 "version": "3.4.0" 168 102 }
Note:
See TracChangeset
for help on using the changeset viewer.