node-red-contrib-web-worldmap 5.7.2 → 5.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +4 -2
- package/node_modules/hasown/CHANGELOG.md +7 -0
- package/node_modules/hasown/index.d.ts +0 -1
- package/node_modules/hasown/package.json +4 -5
- package/node_modules/side-channel/CHANGELOG.md +10 -0
- package/node_modules/side-channel/README.md +1 -1
- package/node_modules/side-channel/index.js +5 -2
- package/node_modules/side-channel/package.json +10 -10
- package/node_modules/side-channel/test/index.js +16 -0
- package/node_modules/uuid/README.md +182 -177
- package/node_modules/uuid/dist/cjs/index.d.ts +15 -0
- package/node_modules/uuid/dist/cjs/index.js +31 -0
- package/node_modules/uuid/dist/cjs/max.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/max.js +3 -0
- package/node_modules/uuid/dist/cjs/md5.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/md5.js +13 -0
- package/node_modules/uuid/dist/cjs/native.d.ts +6 -0
- package/node_modules/uuid/dist/cjs/native.js +4 -0
- package/node_modules/uuid/dist/cjs/nil.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/nil.js +3 -0
- package/node_modules/uuid/dist/cjs/package.json +1 -0
- package/node_modules/uuid/dist/cjs/parse.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/parse.js +11 -0
- package/node_modules/uuid/dist/cjs/regex.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/regex.js +3 -0
- package/node_modules/uuid/dist/cjs/rng.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/rng.js +13 -0
- package/node_modules/uuid/dist/cjs/sha1.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/sha1.js +13 -0
- package/node_modules/uuid/dist/cjs/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/cjs/stringify.js +39 -0
- package/node_modules/uuid/dist/cjs/types.d.ts +21 -0
- package/node_modules/uuid/dist/cjs/types.js +2 -0
- package/node_modules/uuid/dist/cjs/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/cjs/uuid-bin.js +72 -0
- package/node_modules/uuid/dist/cjs/v1.d.ts +11 -0
- package/node_modules/uuid/dist/cjs/v1.js +87 -0
- package/node_modules/uuid/dist/cjs/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/v1ToV6.js +13 -0
- package/node_modules/uuid/dist/cjs/v3.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v3.js +14 -0
- package/node_modules/uuid/dist/cjs/v35.d.ts +7 -0
- package/node_modules/uuid/dist/cjs/v35.js +44 -0
- package/node_modules/uuid/dist/cjs/v4.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/v4.js +29 -0
- package/node_modules/uuid/dist/cjs/v5.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v5.js +14 -0
- package/node_modules/uuid/dist/cjs/v6.d.ts +4 -0
- package/node_modules/uuid/dist/cjs/v6.js +22 -0
- package/node_modules/uuid/dist/cjs/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/v6ToV1.js +13 -0
- package/node_modules/uuid/dist/cjs/v7.d.ts +9 -0
- package/node_modules/uuid/dist/cjs/v7.js +69 -0
- package/node_modules/uuid/dist/cjs/validate.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/validate.js +7 -0
- package/node_modules/uuid/dist/cjs/version.d.ts +2 -0
- package/node_modules/uuid/dist/cjs/version.js +10 -0
- package/node_modules/uuid/dist/cjs-browser/index.d.ts +15 -0
- package/node_modules/uuid/dist/cjs-browser/index.js +31 -0
- package/node_modules/uuid/dist/cjs-browser/max.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/max.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/md5.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/md5.js +137 -0
- package/node_modules/uuid/dist/cjs-browser/native.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/native.js +4 -0
- package/node_modules/uuid/dist/cjs-browser/nil.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/nil.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/package.json +1 -0
- package/node_modules/uuid/dist/cjs-browser/parse.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/parse.js +11 -0
- package/node_modules/uuid/dist/cjs-browser/regex.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/regex.js +3 -0
- package/node_modules/uuid/dist/cjs-browser/rng.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/rng.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/sha1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/sha1.js +72 -0
- package/node_modules/uuid/dist/cjs-browser/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/cjs-browser/stringify.js +39 -0
- package/node_modules/uuid/dist/cjs-browser/types.d.ts +21 -0
- package/node_modules/uuid/dist/cjs-browser/types.js +2 -0
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/cjs-browser/uuid-bin.js +72 -0
- package/node_modules/uuid/dist/cjs-browser/v1.d.ts +11 -0
- package/node_modules/uuid/dist/cjs-browser/v1.js +87 -0
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +13 -0
- package/node_modules/uuid/dist/cjs-browser/v3.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v3.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/v35.d.ts +7 -0
- package/node_modules/uuid/dist/cjs-browser/v35.js +44 -0
- package/node_modules/uuid/dist/cjs-browser/v4.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/v4.js +29 -0
- package/node_modules/uuid/dist/cjs-browser/v5.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v5.js +14 -0
- package/node_modules/uuid/dist/cjs-browser/v6.d.ts +4 -0
- package/node_modules/uuid/dist/cjs-browser/v6.js +22 -0
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +13 -0
- package/node_modules/uuid/dist/cjs-browser/v7.d.ts +9 -0
- package/node_modules/uuid/dist/cjs-browser/v7.js +69 -0
- package/node_modules/uuid/dist/cjs-browser/validate.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/validate.js +7 -0
- package/node_modules/uuid/dist/cjs-browser/version.d.ts +2 -0
- package/node_modules/uuid/dist/cjs-browser/version.js +10 -0
- package/node_modules/uuid/dist/esm/bin/uuid +2 -0
- package/node_modules/uuid/dist/esm/index.d.ts +15 -0
- package/node_modules/uuid/dist/{esm-node → esm}/index.js +9 -4
- package/node_modules/uuid/dist/esm/max.d.ts +2 -0
- package/node_modules/uuid/dist/esm/max.js +1 -0
- package/node_modules/uuid/dist/esm/md5.d.ts +4 -0
- package/node_modules/uuid/dist/esm/md5.js +11 -0
- package/node_modules/uuid/dist/esm/native.d.ts +6 -0
- package/node_modules/uuid/dist/esm/native.js +2 -0
- package/node_modules/uuid/dist/esm/nil.d.ts +2 -0
- package/node_modules/uuid/dist/esm/nil.js +1 -0
- package/node_modules/uuid/dist/esm/parse.d.ts +2 -0
- package/node_modules/uuid/dist/esm/parse.js +9 -0
- package/node_modules/uuid/dist/esm/regex.d.ts +2 -0
- package/node_modules/uuid/dist/esm/regex.js +1 -0
- package/node_modules/uuid/dist/esm/rng.d.ts +1 -0
- package/node_modules/uuid/dist/esm/rng.js +10 -0
- package/node_modules/uuid/dist/esm/sha1.d.ts +4 -0
- package/node_modules/uuid/dist/esm/sha1.js +11 -0
- package/node_modules/uuid/dist/esm/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/esm/stringify.js +35 -0
- package/node_modules/uuid/dist/esm/types.d.ts +21 -0
- package/node_modules/uuid/dist/esm/types.js +1 -0
- package/node_modules/uuid/dist/esm/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/esm/uuid-bin.js +70 -0
- package/node_modules/uuid/dist/esm/v1.d.ts +11 -0
- package/node_modules/uuid/dist/esm/v1.js +83 -0
- package/node_modules/uuid/dist/esm/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/esm/v1ToV6.js +10 -0
- package/node_modules/uuid/dist/esm/v3.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v3.js +9 -0
- package/node_modules/uuid/dist/esm/v35.d.ts +7 -0
- package/node_modules/uuid/dist/esm/v35.js +39 -0
- package/node_modules/uuid/dist/esm/v4.d.ts +4 -0
- package/node_modules/uuid/dist/esm/v4.js +27 -0
- package/node_modules/uuid/dist/esm/v5.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v5.js +9 -0
- package/node_modules/uuid/dist/esm/v6.d.ts +4 -0
- package/node_modules/uuid/dist/esm/v6.js +20 -0
- package/node_modules/uuid/dist/esm/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/esm/v6ToV1.js +10 -0
- package/node_modules/uuid/dist/esm/v7.d.ts +9 -0
- package/node_modules/uuid/dist/esm/v7.js +65 -0
- package/node_modules/uuid/dist/esm/validate.d.ts +2 -0
- package/node_modules/uuid/dist/esm/validate.js +5 -0
- package/node_modules/uuid/dist/esm/version.d.ts +2 -0
- package/node_modules/uuid/dist/esm/version.js +8 -0
- package/node_modules/uuid/dist/esm-browser/index.d.ts +15 -0
- package/node_modules/uuid/dist/esm-browser/index.js +9 -4
- package/node_modules/uuid/dist/esm-browser/max.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/max.js +1 -0
- package/node_modules/uuid/dist/esm-browser/md5.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/md5.js +113 -193
- package/node_modules/uuid/dist/esm-browser/native.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/native.js +2 -0
- package/node_modules/uuid/dist/esm-browser/nil.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/nil.js +1 -1
- package/node_modules/uuid/dist/esm-browser/parse.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/parse.js +6 -32
- package/node_modules/uuid/dist/esm-browser/regex.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/regex.js +1 -1
- package/node_modules/uuid/dist/esm-browser/rng.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/rng.js +8 -16
- package/node_modules/uuid/dist/esm-browser/sha1.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/sha1.js +62 -88
- package/node_modules/uuid/dist/esm-browser/stringify.d.ts +3 -0
- package/node_modules/uuid/dist/esm-browser/stringify.js +32 -27
- package/node_modules/uuid/dist/esm-browser/types.d.ts +21 -0
- package/node_modules/uuid/dist/esm-browser/types.js +1 -0
- package/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +1 -0
- package/node_modules/uuid/dist/esm-browser/uuid-bin.js +70 -0
- package/node_modules/uuid/dist/esm-browser/v1.d.ts +11 -0
- package/node_modules/uuid/dist/esm-browser/v1.js +78 -90
- package/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/v1ToV6.js +10 -0
- package/node_modules/uuid/dist/esm-browser/v3.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v3.js +8 -3
- package/node_modules/uuid/dist/esm-browser/v35.d.ts +7 -0
- package/node_modules/uuid/dist/esm-browser/v35.js +33 -58
- package/node_modules/uuid/dist/esm-browser/v4.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/v4.js +23 -20
- package/node_modules/uuid/dist/esm-browser/v5.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v5.js +8 -3
- package/node_modules/uuid/dist/esm-browser/v6.d.ts +4 -0
- package/node_modules/uuid/dist/esm-browser/v6.js +20 -0
- package/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/v6ToV1.js +10 -0
- package/node_modules/uuid/dist/esm-browser/v7.d.ts +9 -0
- package/node_modules/uuid/dist/esm-browser/v7.js +65 -0
- package/node_modules/uuid/dist/esm-browser/validate.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/validate.js +2 -4
- package/node_modules/uuid/dist/esm-browser/version.d.ts +2 -0
- package/node_modules/uuid/dist/esm-browser/version.js +5 -8
- package/node_modules/uuid/package.json +80 -83
- package/node_modules/websocket-driver/LICENSE.md +1 -1
- package/node_modules/websocket-driver/README.md +1 -1
- package/node_modules/websocket-driver/lib/websocket/driver/draft75.js +1 -0
- package/node_modules/websocket-driver/lib/websocket/driver/hybi.js +6 -1
- package/node_modules/websocket-driver/package.json +1 -1
- package/package.json +4 -1
- package/worldmap/worldmap.js +10 -1
- package/worldmap.html +1 -1
- package/node_modules/uuid/CHANGELOG.md +0 -229
- package/node_modules/uuid/CONTRIBUTING.md +0 -18
- package/node_modules/uuid/dist/bin/uuid +0 -2
- package/node_modules/uuid/dist/esm-node/md5.js +0 -13
- package/node_modules/uuid/dist/esm-node/nil.js +0 -1
- package/node_modules/uuid/dist/esm-node/parse.js +0 -35
- package/node_modules/uuid/dist/esm-node/regex.js +0 -1
- package/node_modules/uuid/dist/esm-node/rng.js +0 -12
- package/node_modules/uuid/dist/esm-node/sha1.js +0 -13
- package/node_modules/uuid/dist/esm-node/stringify.js +0 -29
- package/node_modules/uuid/dist/esm-node/v1.js +0 -95
- package/node_modules/uuid/dist/esm-node/v3.js +0 -4
- package/node_modules/uuid/dist/esm-node/v35.js +0 -64
- package/node_modules/uuid/dist/esm-node/v4.js +0 -24
- package/node_modules/uuid/dist/esm-node/v5.js +0 -4
- package/node_modules/uuid/dist/esm-node/validate.js +0 -7
- package/node_modules/uuid/dist/esm-node/version.js +0 -11
- package/node_modules/uuid/dist/index.js +0 -79
- package/node_modules/uuid/dist/md5-browser.js +0 -223
- package/node_modules/uuid/dist/md5.js +0 -23
- package/node_modules/uuid/dist/nil.js +0 -8
- package/node_modules/uuid/dist/parse.js +0 -45
- package/node_modules/uuid/dist/regex.js +0 -8
- package/node_modules/uuid/dist/rng-browser.js +0 -26
- package/node_modules/uuid/dist/rng.js +0 -24
- package/node_modules/uuid/dist/sha1-browser.js +0 -104
- package/node_modules/uuid/dist/sha1.js +0 -23
- package/node_modules/uuid/dist/stringify.js +0 -39
- package/node_modules/uuid/dist/umd/uuid.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidNIL.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidParse.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidStringify.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidValidate.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidVersion.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv1.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv3.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv4.min.js +0 -1
- package/node_modules/uuid/dist/umd/uuidv5.min.js +0 -1
- package/node_modules/uuid/dist/uuid-bin.js +0 -85
- package/node_modules/uuid/dist/v1.js +0 -107
- package/node_modules/uuid/dist/v3.js +0 -16
- package/node_modules/uuid/dist/v35.js +0 -78
- package/node_modules/uuid/dist/v4.js +0 -37
- package/node_modules/uuid/dist/v5.js +0 -16
- package/node_modules/uuid/dist/validate.js +0 -17
- package/node_modules/uuid/dist/version.js +0 -21
- package/node_modules/uuid/wrapper.mjs +0 -10
- package/node_modules/websocket-driver/CHANGELOG.md +0 -142
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
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
|
-
|
|
5
|
-
### [8.3.2](https://github.com/uuidjs/uuid/compare/v8.3.1...v8.3.2) (2020-12-08)
|
|
6
|
-
|
|
7
|
-
### Bug Fixes
|
|
8
|
-
|
|
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)
|
|
10
|
-
|
|
11
|
-
### [8.3.1](https://github.com/uuidjs/uuid/compare/v8.3.0...v8.3.1) (2020-10-04)
|
|
12
|
-
|
|
13
|
-
### Bug Fixes
|
|
14
|
-
|
|
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)
|
|
16
|
-
|
|
17
|
-
## [8.3.0](https://github.com/uuidjs/uuid/compare/v8.2.0...v8.3.0) (2020-07-27)
|
|
18
|
-
|
|
19
|
-
### Features
|
|
20
|
-
|
|
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)
|
|
22
|
-
|
|
23
|
-
## [8.2.0](https://github.com/uuidjs/uuid/compare/v8.1.0...v8.2.0) (2020-06-23)
|
|
24
|
-
|
|
25
|
-
### Features
|
|
26
|
-
|
|
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))
|
|
30
|
-
|
|
31
|
-
### Bug Fixes
|
|
32
|
-
|
|
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
|
-
### Features
|
|
38
|
-
|
|
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 Fixes
|
|
43
|
-
|
|
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 CHANGES
|
|
49
|
-
|
|
50
|
-
- For native ECMAScript Module (ESM) usage in Node.js only named exports are exposed, there is no more default export.
|
|
51
|
-
|
|
52
|
-
```diff
|
|
53
|
-
-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
|
-
```diff
|
|
66
|
-
-import uuidv4 from 'uuid/v4';
|
|
67
|
-
+import { v4 as uuidv4 } from 'uuid';
|
|
68
|
-
uuidv4();
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
For CommonJS:
|
|
72
|
-
|
|
73
|
-
```diff
|
|
74
|
-
-const uuidv4 = require('uuid/v4');
|
|
75
|
-
+const { v4: uuidv4 } = require('uuid');
|
|
76
|
-
uuidv4();
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
### Features
|
|
80
|
-
|
|
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 Fixes
|
|
85
|
-
|
|
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 Fixes
|
|
91
|
-
|
|
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 Fixes
|
|
97
|
-
|
|
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 Fixes
|
|
105
|
-
|
|
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 CHANGES
|
|
112
|
-
|
|
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.x
|
|
117
|
-
- Convert code base to ECMAScript Modules (ESM) and release CommonJS build for node and ESM build for browser bundlers.
|
|
118
|
-
|
|
119
|
-
### Features
|
|
120
|
-
|
|
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 Fixes
|
|
130
|
-
|
|
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
|
-
### Features
|
|
138
|
-
|
|
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 Fixes
|
|
144
|
-
|
|
145
|
-
- no longer run ci tests on node v4
|
|
146
|
-
- upgrade dependencies
|
|
147
|
-
|
|
148
|
-
## [3.3.2](https://github.com/uuidjs/uuid/compare/v3.3.1...v3.3.2) (2018-06-28)
|
|
149
|
-
|
|
150
|
-
### Bug Fixes
|
|
151
|
-
|
|
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 Fixes
|
|
157
|
-
|
|
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 Fixes
|
|
163
|
-
|
|
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
|
-
### Features
|
|
170
|
-
|
|
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 Fixes
|
|
176
|
-
|
|
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 Fixes
|
|
182
|
-
|
|
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
|
-
### Features
|
|
187
|
-
|
|
188
|
-
- Add v3 Support ([#217](https://github.com/uuidjs/uuid/issues/217)) ([d94f726](https://github.com/uuidjs/uuid/commit/d94f726))
|
|
189
|
-
|
|
190
|
-
# [3.1.0](https://github.com/uuidjs/uuid/compare/v3.1.0...v3.0.1) (2017-06-17)
|
|
191
|
-
|
|
192
|
-
### Bug Fixes
|
|
193
|
-
|
|
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)
|
|
197
|
-
|
|
198
|
-
### Features
|
|
199
|
-
|
|
200
|
-
- v5 support in CLI (#197)
|
|
201
|
-
- V5 support (#188)
|
|
202
|
-
|
|
203
|
-
# 3.0.1 (2016-11-28)
|
|
204
|
-
|
|
205
|
-
- split uuid versions into separate files
|
|
206
|
-
|
|
207
|
-
# 3.0.0 (2016-11-17)
|
|
208
|
-
|
|
209
|
-
- remove .parse and .unparse
|
|
210
|
-
|
|
211
|
-
# 2.0.0
|
|
212
|
-
|
|
213
|
-
- Removed uuid.BufferClass
|
|
214
|
-
|
|
215
|
-
# 1.4.0
|
|
216
|
-
|
|
217
|
-
- Improved module context detection
|
|
218
|
-
- Removed public RNG functions
|
|
219
|
-
|
|
220
|
-
# 1.3.2
|
|
221
|
-
|
|
222
|
-
- Improve tests and handling of v1() options (Issue #24)
|
|
223
|
-
- Expose RNG option to allow for perf testing with different generators
|
|
224
|
-
|
|
225
|
-
# 1.3.0
|
|
226
|
-
|
|
227
|
-
- Support for version 1 ids, thanks to [@ctavan](https://github.com/ctavan)!
|
|
228
|
-
- Support for node.js crypto API
|
|
229
|
-
- De-emphasizing performance in favor of a) cryptographic quality PRNGs where available and b) more manageable code
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Contributing
|
|
2
|
-
|
|
3
|
-
Please feel free to file GitHub Issues or propose Pull Requests. We're always happy to discuss improvements to this library!
|
|
4
|
-
|
|
5
|
-
## Testing
|
|
6
|
-
|
|
7
|
-
```shell
|
|
8
|
-
npm test
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Releasing
|
|
12
|
-
|
|
13
|
-
Releases are supposed to be done from master, version bumping is automated through [`standard-version`](https://github.com/conventional-changelog/standard-version):
|
|
14
|
-
|
|
15
|
-
```shell
|
|
16
|
-
npm run release -- --dry-run # verify output manually
|
|
17
|
-
npm run release # follow the instructions from the output of this command
|
|
18
|
-
```
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import crypto from 'crypto';
|
|
2
|
-
|
|
3
|
-
function md5(bytes) {
|
|
4
|
-
if (Array.isArray(bytes)) {
|
|
5
|
-
bytes = Buffer.from(bytes);
|
|
6
|
-
} else if (typeof bytes === 'string') {
|
|
7
|
-
bytes = Buffer.from(bytes, 'utf8');
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
return crypto.createHash('md5').update(bytes).digest();
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default md5;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default '00000000-0000-0000-0000-000000000000';
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import validate from './validate.js';
|
|
2
|
-
|
|
3
|
-
function parse(uuid) {
|
|
4
|
-
if (!validate(uuid)) {
|
|
5
|
-
throw TypeError('Invalid UUID');
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
let v;
|
|
9
|
-
const arr = new Uint8Array(16); // Parse ########-....-....-....-............
|
|
10
|
-
|
|
11
|
-
arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
|
|
12
|
-
arr[1] = v >>> 16 & 0xff;
|
|
13
|
-
arr[2] = v >>> 8 & 0xff;
|
|
14
|
-
arr[3] = v & 0xff; // Parse ........-####-....-....-............
|
|
15
|
-
|
|
16
|
-
arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
|
|
17
|
-
arr[5] = v & 0xff; // Parse ........-....-####-....-............
|
|
18
|
-
|
|
19
|
-
arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
|
|
20
|
-
arr[7] = v & 0xff; // Parse ........-....-....-####-............
|
|
21
|
-
|
|
22
|
-
arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
|
|
23
|
-
arr[9] = v & 0xff; // Parse ........-....-....-....-############
|
|
24
|
-
// (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
|
|
25
|
-
|
|
26
|
-
arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
|
|
27
|
-
arr[11] = v / 0x100000000 & 0xff;
|
|
28
|
-
arr[12] = v >>> 24 & 0xff;
|
|
29
|
-
arr[13] = v >>> 16 & 0xff;
|
|
30
|
-
arr[14] = v >>> 8 & 0xff;
|
|
31
|
-
arr[15] = v & 0xff;
|
|
32
|
-
return arr;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export default parse;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import crypto from 'crypto';
|
|
2
|
-
const rnds8Pool = new Uint8Array(256); // # of random values to pre-allocate
|
|
3
|
-
|
|
4
|
-
let poolPtr = rnds8Pool.length;
|
|
5
|
-
export default function rng() {
|
|
6
|
-
if (poolPtr > rnds8Pool.length - 16) {
|
|
7
|
-
crypto.randomFillSync(rnds8Pool);
|
|
8
|
-
poolPtr = 0;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
return rnds8Pool.slice(poolPtr, poolPtr += 16);
|
|
12
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import crypto from 'crypto';
|
|
2
|
-
|
|
3
|
-
function sha1(bytes) {
|
|
4
|
-
if (Array.isArray(bytes)) {
|
|
5
|
-
bytes = Buffer.from(bytes);
|
|
6
|
-
} else if (typeof bytes === 'string') {
|
|
7
|
-
bytes = Buffer.from(bytes, 'utf8');
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
return crypto.createHash('sha1').update(bytes).digest();
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export default sha1;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import validate from './validate.js';
|
|
2
|
-
/**
|
|
3
|
-
* Convert array of 16 byte values to UUID string format of the form:
|
|
4
|
-
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
const byteToHex = [];
|
|
8
|
-
|
|
9
|
-
for (let i = 0; i < 256; ++i) {
|
|
10
|
-
byteToHex.push((i + 0x100).toString(16).substr(1));
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function stringify(arr, offset = 0) {
|
|
14
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
|
15
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
16
|
-
const uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
|
|
17
|
-
// of the following:
|
|
18
|
-
// - One or more input array values don't map to a hex octet (leading to
|
|
19
|
-
// "undefined" in the uuid)
|
|
20
|
-
// - Invalid input values for the RFC `version` or `variant` fields
|
|
21
|
-
|
|
22
|
-
if (!validate(uuid)) {
|
|
23
|
-
throw TypeError('Stringified UUID is invalid');
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
return uuid;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default stringify;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import rng from './rng.js';
|
|
2
|
-
import stringify from './stringify.js'; // **`v1()` - Generate time-based UUID**
|
|
3
|
-
//
|
|
4
|
-
// Inspired by https://github.com/LiosK/UUID.js
|
|
5
|
-
// and http://docs.python.org/library/uuid.html
|
|
6
|
-
|
|
7
|
-
let _nodeId;
|
|
8
|
-
|
|
9
|
-
let _clockseq; // Previous uuid creation time
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
let _lastMSecs = 0;
|
|
13
|
-
let _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details
|
|
14
|
-
|
|
15
|
-
function v1(options, buf, offset) {
|
|
16
|
-
let i = buf && offset || 0;
|
|
17
|
-
const b = buf || new Array(16);
|
|
18
|
-
options = options || {};
|
|
19
|
-
let node = options.node || _nodeId;
|
|
20
|
-
let clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not
|
|
21
|
-
// specified. We do this lazily to minimize issues related to insufficient
|
|
22
|
-
// system entropy. See #189
|
|
23
|
-
|
|
24
|
-
if (node == null || clockseq == null) {
|
|
25
|
-
const seedBytes = options.random || (options.rng || rng)();
|
|
26
|
-
|
|
27
|
-
if (node == null) {
|
|
28
|
-
// Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
|
|
29
|
-
node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (clockseq == null) {
|
|
33
|
-
// Per 4.2.2, randomize (14 bit) clockseq
|
|
34
|
-
clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
|
|
35
|
-
}
|
|
36
|
-
} // UUID timestamps are 100 nano-second units since the Gregorian epoch,
|
|
37
|
-
// (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
|
|
38
|
-
// time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
|
|
39
|
-
// (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
let msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock
|
|
43
|
-
// cycle to simulate higher resolution clock
|
|
44
|
-
|
|
45
|
-
let nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)
|
|
46
|
-
|
|
47
|
-
const dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression
|
|
48
|
-
|
|
49
|
-
if (dt < 0 && options.clockseq === undefined) {
|
|
50
|
-
clockseq = clockseq + 1 & 0x3fff;
|
|
51
|
-
} // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
|
|
52
|
-
// time interval
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
|
|
56
|
-
nsecs = 0;
|
|
57
|
-
} // Per 4.2.1.2 Throw error if too many uuids are requested
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
if (nsecs >= 10000) {
|
|
61
|
-
throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
_lastMSecs = msecs;
|
|
65
|
-
_lastNSecs = nsecs;
|
|
66
|
-
_clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
|
|
67
|
-
|
|
68
|
-
msecs += 12219292800000; // `time_low`
|
|
69
|
-
|
|
70
|
-
const tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
|
|
71
|
-
b[i++] = tl >>> 24 & 0xff;
|
|
72
|
-
b[i++] = tl >>> 16 & 0xff;
|
|
73
|
-
b[i++] = tl >>> 8 & 0xff;
|
|
74
|
-
b[i++] = tl & 0xff; // `time_mid`
|
|
75
|
-
|
|
76
|
-
const tmh = msecs / 0x100000000 * 10000 & 0xfffffff;
|
|
77
|
-
b[i++] = tmh >>> 8 & 0xff;
|
|
78
|
-
b[i++] = tmh & 0xff; // `time_high_and_version`
|
|
79
|
-
|
|
80
|
-
b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
|
|
81
|
-
|
|
82
|
-
b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
|
|
83
|
-
|
|
84
|
-
b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`
|
|
85
|
-
|
|
86
|
-
b[i++] = clockseq & 0xff; // `node`
|
|
87
|
-
|
|
88
|
-
for (let n = 0; n < 6; ++n) {
|
|
89
|
-
b[i + n] = node[n];
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
return buf || stringify(b);
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export default v1;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import stringify from './stringify.js';
|
|
2
|
-
import parse from './parse.js';
|
|
3
|
-
|
|
4
|
-
function stringToBytes(str) {
|
|
5
|
-
str = unescape(encodeURIComponent(str)); // UTF8 escape
|
|
6
|
-
|
|
7
|
-
const bytes = [];
|
|
8
|
-
|
|
9
|
-
for (let i = 0; i < str.length; ++i) {
|
|
10
|
-
bytes.push(str.charCodeAt(i));
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
return bytes;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export const DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';
|
|
17
|
-
export const URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';
|
|
18
|
-
export default function (name, version, hashfunc) {
|
|
19
|
-
function generateUUID(value, namespace, buf, offset) {
|
|
20
|
-
if (typeof value === 'string') {
|
|
21
|
-
value = stringToBytes(value);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
if (typeof namespace === 'string') {
|
|
25
|
-
namespace = parse(namespace);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
if (namespace.length !== 16) {
|
|
29
|
-
throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');
|
|
30
|
-
} // Compute hash of namespace and value, Per 4.3
|
|
31
|
-
// Future: Use spread syntax when supported on all platforms, e.g. `bytes =
|
|
32
|
-
// hashfunc([...namespace, ... value])`
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
let bytes = new Uint8Array(16 + value.length);
|
|
36
|
-
bytes.set(namespace);
|
|
37
|
-
bytes.set(value, namespace.length);
|
|
38
|
-
bytes = hashfunc(bytes);
|
|
39
|
-
bytes[6] = bytes[6] & 0x0f | version;
|
|
40
|
-
bytes[8] = bytes[8] & 0x3f | 0x80;
|
|
41
|
-
|
|
42
|
-
if (buf) {
|
|
43
|
-
offset = offset || 0;
|
|
44
|
-
|
|
45
|
-
for (let i = 0; i < 16; ++i) {
|
|
46
|
-
buf[offset + i] = bytes[i];
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return buf;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return stringify(bytes);
|
|
53
|
-
} // Function#name is not settable on some platforms (#270)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
try {
|
|
57
|
-
generateUUID.name = name; // eslint-disable-next-line no-empty
|
|
58
|
-
} catch (err) {} // For CommonJS default export support
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
generateUUID.DNS = DNS;
|
|
62
|
-
generateUUID.URL = URL;
|
|
63
|
-
return generateUUID;
|
|
64
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import rng from './rng.js';
|
|
2
|
-
import stringify from './stringify.js';
|
|
3
|
-
|
|
4
|
-
function v4(options, buf, offset) {
|
|
5
|
-
options = options || {};
|
|
6
|
-
const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
7
|
-
|
|
8
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
9
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
10
|
-
|
|
11
|
-
if (buf) {
|
|
12
|
-
offset = offset || 0;
|
|
13
|
-
|
|
14
|
-
for (let i = 0; i < 16; ++i) {
|
|
15
|
-
buf[offset + i] = rnds[i];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return buf;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
return stringify(rnds);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export default v4;
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "v1", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _v.default;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "v3", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _v2.default;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "v4", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _v3.default;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "v5", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _v4.default;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "NIL", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _nil.default;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "version", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _version.default;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(exports, "validate", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function () {
|
|
45
|
-
return _validate.default;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "stringify", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function () {
|
|
51
|
-
return _stringify.default;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(exports, "parse", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _parse.default;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
var _v = _interopRequireDefault(require("./v1.js"));
|
|
62
|
-
|
|
63
|
-
var _v2 = _interopRequireDefault(require("./v3.js"));
|
|
64
|
-
|
|
65
|
-
var _v3 = _interopRequireDefault(require("./v4.js"));
|
|
66
|
-
|
|
67
|
-
var _v4 = _interopRequireDefault(require("./v5.js"));
|
|
68
|
-
|
|
69
|
-
var _nil = _interopRequireDefault(require("./nil.js"));
|
|
70
|
-
|
|
71
|
-
var _version = _interopRequireDefault(require("./version.js"));
|
|
72
|
-
|
|
73
|
-
var _validate = _interopRequireDefault(require("./validate.js"));
|
|
74
|
-
|
|
75
|
-
var _stringify = _interopRequireDefault(require("./stringify.js"));
|
|
76
|
-
|
|
77
|
-
var _parse = _interopRequireDefault(require("./parse.js"));
|
|
78
|
-
|
|
79
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|