node-red-contrib-web-worldmap 5.7.1 → 5.8.0

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.
Files changed (279) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +3 -1
  3. package/node_modules/es-object-atoms/CHANGELOG.md +21 -14
  4. package/node_modules/es-object-atoms/isObject.d.ts +1 -1
  5. package/node_modules/es-object-atoms/package.json +6 -7
  6. package/node_modules/es-object-atoms/tsconfig.json +1 -0
  7. package/node_modules/express/History.md +9 -0
  8. package/node_modules/express/lib/utils.js +2 -1
  9. package/node_modules/express/package.json +3 -3
  10. package/node_modules/qs/CHANGELOG.md +178 -0
  11. package/node_modules/qs/README.md +19 -1
  12. package/node_modules/qs/dist/qs.js +17 -17
  13. package/node_modules/qs/eslint.config.mjs +1 -0
  14. package/node_modules/qs/lib/parse.js +57 -25
  15. package/node_modules/qs/lib/stringify.js +11 -4
  16. package/node_modules/qs/lib/utils.js +2 -0
  17. package/node_modules/qs/package.json +3 -3
  18. package/node_modules/qs/test/parse.js +195 -4
  19. package/node_modules/qs/test/stringify.js +138 -0
  20. package/node_modules/qs/test/utils.js +38 -3
  21. package/node_modules/uuid/README.md +182 -177
  22. package/node_modules/uuid/dist/cjs/index.d.ts +15 -0
  23. package/node_modules/uuid/dist/cjs/index.js +31 -0
  24. package/node_modules/uuid/dist/cjs/max.d.ts +2 -0
  25. package/node_modules/uuid/dist/cjs/max.js +3 -0
  26. package/node_modules/uuid/dist/cjs/md5.d.ts +4 -0
  27. package/node_modules/uuid/dist/cjs/md5.js +13 -0
  28. package/node_modules/uuid/dist/cjs/native.d.ts +6 -0
  29. package/node_modules/uuid/dist/cjs/native.js +4 -0
  30. package/node_modules/uuid/dist/cjs/nil.d.ts +2 -0
  31. package/node_modules/uuid/dist/cjs/nil.js +3 -0
  32. package/node_modules/uuid/dist/cjs/package.json +1 -0
  33. package/node_modules/uuid/dist/cjs/parse.d.ts +2 -0
  34. package/node_modules/uuid/dist/cjs/parse.js +11 -0
  35. package/node_modules/uuid/dist/cjs/regex.d.ts +2 -0
  36. package/node_modules/uuid/dist/cjs/regex.js +3 -0
  37. package/node_modules/uuid/dist/cjs/rng.d.ts +1 -0
  38. package/node_modules/uuid/dist/cjs/rng.js +13 -0
  39. package/node_modules/uuid/dist/cjs/sha1.d.ts +4 -0
  40. package/node_modules/uuid/dist/cjs/sha1.js +13 -0
  41. package/node_modules/uuid/dist/cjs/stringify.d.ts +3 -0
  42. package/node_modules/uuid/dist/cjs/stringify.js +39 -0
  43. package/node_modules/uuid/dist/cjs/types.d.ts +21 -0
  44. package/node_modules/uuid/dist/cjs/types.js +2 -0
  45. package/node_modules/uuid/dist/cjs/uuid-bin.d.ts +1 -0
  46. package/node_modules/uuid/dist/cjs/uuid-bin.js +72 -0
  47. package/node_modules/uuid/dist/cjs/v1.d.ts +11 -0
  48. package/node_modules/uuid/dist/cjs/v1.js +87 -0
  49. package/node_modules/uuid/dist/cjs/v1ToV6.d.ts +2 -0
  50. package/node_modules/uuid/dist/cjs/v1ToV6.js +13 -0
  51. package/node_modules/uuid/dist/cjs/v3.d.ts +9 -0
  52. package/node_modules/uuid/dist/cjs/v3.js +14 -0
  53. package/node_modules/uuid/dist/cjs/v35.d.ts +7 -0
  54. package/node_modules/uuid/dist/cjs/v35.js +44 -0
  55. package/node_modules/uuid/dist/cjs/v4.d.ts +4 -0
  56. package/node_modules/uuid/dist/cjs/v4.js +29 -0
  57. package/node_modules/uuid/dist/cjs/v5.d.ts +9 -0
  58. package/node_modules/uuid/dist/cjs/v5.js +14 -0
  59. package/node_modules/uuid/dist/cjs/v6.d.ts +4 -0
  60. package/node_modules/uuid/dist/cjs/v6.js +22 -0
  61. package/node_modules/uuid/dist/cjs/v6ToV1.d.ts +2 -0
  62. package/node_modules/uuid/dist/cjs/v6ToV1.js +13 -0
  63. package/node_modules/uuid/dist/cjs/v7.d.ts +9 -0
  64. package/node_modules/uuid/dist/cjs/v7.js +69 -0
  65. package/node_modules/uuid/dist/cjs/validate.d.ts +2 -0
  66. package/node_modules/uuid/dist/cjs/validate.js +7 -0
  67. package/node_modules/uuid/dist/cjs/version.d.ts +2 -0
  68. package/node_modules/uuid/dist/cjs/version.js +10 -0
  69. package/node_modules/uuid/dist/cjs-browser/index.d.ts +15 -0
  70. package/node_modules/uuid/dist/cjs-browser/index.js +31 -0
  71. package/node_modules/uuid/dist/cjs-browser/max.d.ts +2 -0
  72. package/node_modules/uuid/dist/cjs-browser/max.js +3 -0
  73. package/node_modules/uuid/dist/cjs-browser/md5.d.ts +2 -0
  74. package/node_modules/uuid/dist/cjs-browser/md5.js +137 -0
  75. package/node_modules/uuid/dist/cjs-browser/native.d.ts +4 -0
  76. package/node_modules/uuid/dist/cjs-browser/native.js +4 -0
  77. package/node_modules/uuid/dist/cjs-browser/nil.d.ts +2 -0
  78. package/node_modules/uuid/dist/cjs-browser/nil.js +3 -0
  79. package/node_modules/uuid/dist/cjs-browser/package.json +1 -0
  80. package/node_modules/uuid/dist/cjs-browser/parse.d.ts +2 -0
  81. package/node_modules/uuid/dist/cjs-browser/parse.js +11 -0
  82. package/node_modules/uuid/dist/cjs-browser/regex.d.ts +2 -0
  83. package/node_modules/uuid/dist/cjs-browser/regex.js +3 -0
  84. package/node_modules/uuid/dist/cjs-browser/rng.d.ts +1 -0
  85. package/node_modules/uuid/dist/cjs-browser/rng.js +14 -0
  86. package/node_modules/uuid/dist/cjs-browser/sha1.d.ts +2 -0
  87. package/node_modules/uuid/dist/cjs-browser/sha1.js +72 -0
  88. package/node_modules/uuid/dist/cjs-browser/stringify.d.ts +3 -0
  89. package/node_modules/uuid/dist/cjs-browser/stringify.js +39 -0
  90. package/node_modules/uuid/dist/cjs-browser/types.d.ts +21 -0
  91. package/node_modules/uuid/dist/cjs-browser/types.js +2 -0
  92. package/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts +1 -0
  93. package/node_modules/uuid/dist/cjs-browser/uuid-bin.js +72 -0
  94. package/node_modules/uuid/dist/cjs-browser/v1.d.ts +11 -0
  95. package/node_modules/uuid/dist/cjs-browser/v1.js +87 -0
  96. package/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts +2 -0
  97. package/node_modules/uuid/dist/cjs-browser/v1ToV6.js +13 -0
  98. package/node_modules/uuid/dist/cjs-browser/v3.d.ts +9 -0
  99. package/node_modules/uuid/dist/cjs-browser/v3.js +14 -0
  100. package/node_modules/uuid/dist/cjs-browser/v35.d.ts +7 -0
  101. package/node_modules/uuid/dist/cjs-browser/v35.js +44 -0
  102. package/node_modules/uuid/dist/cjs-browser/v4.d.ts +4 -0
  103. package/node_modules/uuid/dist/cjs-browser/v4.js +29 -0
  104. package/node_modules/uuid/dist/cjs-browser/v5.d.ts +9 -0
  105. package/node_modules/uuid/dist/cjs-browser/v5.js +14 -0
  106. package/node_modules/uuid/dist/cjs-browser/v6.d.ts +4 -0
  107. package/node_modules/uuid/dist/cjs-browser/v6.js +22 -0
  108. package/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts +2 -0
  109. package/node_modules/uuid/dist/cjs-browser/v6ToV1.js +13 -0
  110. package/node_modules/uuid/dist/cjs-browser/v7.d.ts +9 -0
  111. package/node_modules/uuid/dist/cjs-browser/v7.js +69 -0
  112. package/node_modules/uuid/dist/cjs-browser/validate.d.ts +2 -0
  113. package/node_modules/uuid/dist/cjs-browser/validate.js +7 -0
  114. package/node_modules/uuid/dist/cjs-browser/version.d.ts +2 -0
  115. package/node_modules/uuid/dist/cjs-browser/version.js +10 -0
  116. package/node_modules/uuid/dist/esm/bin/uuid +2 -0
  117. package/node_modules/uuid/dist/esm/index.d.ts +15 -0
  118. package/node_modules/uuid/dist/{esm-node → esm}/index.js +9 -4
  119. package/node_modules/uuid/dist/esm/max.d.ts +2 -0
  120. package/node_modules/uuid/dist/esm/max.js +1 -0
  121. package/node_modules/uuid/dist/esm/md5.d.ts +4 -0
  122. package/node_modules/uuid/dist/esm/md5.js +11 -0
  123. package/node_modules/uuid/dist/esm/native.d.ts +6 -0
  124. package/node_modules/uuid/dist/esm/native.js +2 -0
  125. package/node_modules/uuid/dist/esm/nil.d.ts +2 -0
  126. package/node_modules/uuid/dist/esm/nil.js +1 -0
  127. package/node_modules/uuid/dist/esm/parse.d.ts +2 -0
  128. package/node_modules/uuid/dist/esm/parse.js +9 -0
  129. package/node_modules/uuid/dist/esm/regex.d.ts +2 -0
  130. package/node_modules/uuid/dist/esm/regex.js +1 -0
  131. package/node_modules/uuid/dist/esm/rng.d.ts +1 -0
  132. package/node_modules/uuid/dist/esm/rng.js +10 -0
  133. package/node_modules/uuid/dist/esm/sha1.d.ts +4 -0
  134. package/node_modules/uuid/dist/esm/sha1.js +11 -0
  135. package/node_modules/uuid/dist/esm/stringify.d.ts +3 -0
  136. package/node_modules/uuid/dist/esm/stringify.js +35 -0
  137. package/node_modules/uuid/dist/esm/types.d.ts +21 -0
  138. package/node_modules/uuid/dist/esm/types.js +1 -0
  139. package/node_modules/uuid/dist/esm/uuid-bin.d.ts +1 -0
  140. package/node_modules/uuid/dist/esm/uuid-bin.js +70 -0
  141. package/node_modules/uuid/dist/esm/v1.d.ts +11 -0
  142. package/node_modules/uuid/dist/esm/v1.js +83 -0
  143. package/node_modules/uuid/dist/esm/v1ToV6.d.ts +2 -0
  144. package/node_modules/uuid/dist/esm/v1ToV6.js +10 -0
  145. package/node_modules/uuid/dist/esm/v3.d.ts +9 -0
  146. package/node_modules/uuid/dist/esm/v3.js +9 -0
  147. package/node_modules/uuid/dist/esm/v35.d.ts +7 -0
  148. package/node_modules/uuid/dist/esm/v35.js +39 -0
  149. package/node_modules/uuid/dist/esm/v4.d.ts +4 -0
  150. package/node_modules/uuid/dist/esm/v4.js +27 -0
  151. package/node_modules/uuid/dist/esm/v5.d.ts +9 -0
  152. package/node_modules/uuid/dist/esm/v5.js +9 -0
  153. package/node_modules/uuid/dist/esm/v6.d.ts +4 -0
  154. package/node_modules/uuid/dist/esm/v6.js +20 -0
  155. package/node_modules/uuid/dist/esm/v6ToV1.d.ts +2 -0
  156. package/node_modules/uuid/dist/esm/v6ToV1.js +10 -0
  157. package/node_modules/uuid/dist/esm/v7.d.ts +9 -0
  158. package/node_modules/uuid/dist/esm/v7.js +65 -0
  159. package/node_modules/uuid/dist/esm/validate.d.ts +2 -0
  160. package/node_modules/uuid/dist/esm/validate.js +5 -0
  161. package/node_modules/uuid/dist/esm/version.d.ts +2 -0
  162. package/node_modules/uuid/dist/esm/version.js +8 -0
  163. package/node_modules/uuid/dist/esm-browser/index.d.ts +15 -0
  164. package/node_modules/uuid/dist/esm-browser/index.js +9 -4
  165. package/node_modules/uuid/dist/esm-browser/max.d.ts +2 -0
  166. package/node_modules/uuid/dist/esm-browser/max.js +1 -0
  167. package/node_modules/uuid/dist/esm-browser/md5.d.ts +2 -0
  168. package/node_modules/uuid/dist/esm-browser/md5.js +113 -193
  169. package/node_modules/uuid/dist/esm-browser/native.d.ts +4 -0
  170. package/node_modules/uuid/dist/esm-browser/native.js +2 -0
  171. package/node_modules/uuid/dist/esm-browser/nil.d.ts +2 -0
  172. package/node_modules/uuid/dist/esm-browser/nil.js +1 -1
  173. package/node_modules/uuid/dist/esm-browser/parse.d.ts +2 -0
  174. package/node_modules/uuid/dist/esm-browser/parse.js +6 -32
  175. package/node_modules/uuid/dist/esm-browser/regex.d.ts +2 -0
  176. package/node_modules/uuid/dist/esm-browser/regex.js +1 -1
  177. package/node_modules/uuid/dist/esm-browser/rng.d.ts +1 -0
  178. package/node_modules/uuid/dist/esm-browser/rng.js +8 -16
  179. package/node_modules/uuid/dist/esm-browser/sha1.d.ts +2 -0
  180. package/node_modules/uuid/dist/esm-browser/sha1.js +62 -88
  181. package/node_modules/uuid/dist/esm-browser/stringify.d.ts +3 -0
  182. package/node_modules/uuid/dist/esm-browser/stringify.js +32 -27
  183. package/node_modules/uuid/dist/esm-browser/types.d.ts +21 -0
  184. package/node_modules/uuid/dist/esm-browser/types.js +1 -0
  185. package/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +1 -0
  186. package/node_modules/uuid/dist/esm-browser/uuid-bin.js +70 -0
  187. package/node_modules/uuid/dist/esm-browser/v1.d.ts +11 -0
  188. package/node_modules/uuid/dist/esm-browser/v1.js +78 -90
  189. package/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +2 -0
  190. package/node_modules/uuid/dist/esm-browser/v1ToV6.js +10 -0
  191. package/node_modules/uuid/dist/esm-browser/v3.d.ts +9 -0
  192. package/node_modules/uuid/dist/esm-browser/v3.js +8 -3
  193. package/node_modules/uuid/dist/esm-browser/v35.d.ts +7 -0
  194. package/node_modules/uuid/dist/esm-browser/v35.js +33 -58
  195. package/node_modules/uuid/dist/esm-browser/v4.d.ts +4 -0
  196. package/node_modules/uuid/dist/esm-browser/v4.js +23 -20
  197. package/node_modules/uuid/dist/esm-browser/v5.d.ts +9 -0
  198. package/node_modules/uuid/dist/esm-browser/v5.js +8 -3
  199. package/node_modules/uuid/dist/esm-browser/v6.d.ts +4 -0
  200. package/node_modules/uuid/dist/esm-browser/v6.js +20 -0
  201. package/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +2 -0
  202. package/node_modules/uuid/dist/esm-browser/v6ToV1.js +10 -0
  203. package/node_modules/uuid/dist/esm-browser/v7.d.ts +9 -0
  204. package/node_modules/uuid/dist/esm-browser/v7.js +65 -0
  205. package/node_modules/uuid/dist/esm-browser/validate.d.ts +2 -0
  206. package/node_modules/uuid/dist/esm-browser/validate.js +2 -4
  207. package/node_modules/uuid/dist/esm-browser/version.d.ts +2 -0
  208. package/node_modules/uuid/dist/esm-browser/version.js +5 -8
  209. package/node_modules/uuid/package.json +80 -83
  210. package/package.json +5 -2
  211. package/worldmap/worldmap.js +7 -0
  212. package/worldmap.html +1 -1
  213. package/node_modules/body-parser/node_modules/qs/.editorconfig +0 -46
  214. package/node_modules/body-parser/node_modules/qs/.github/FUNDING.yml +0 -12
  215. package/node_modules/body-parser/node_modules/qs/.github/SECURITY.md +0 -11
  216. package/node_modules/body-parser/node_modules/qs/.github/THREAT_MODEL.md +0 -78
  217. package/node_modules/body-parser/node_modules/qs/.nycrc +0 -13
  218. package/node_modules/body-parser/node_modules/qs/CHANGELOG.md +0 -822
  219. package/node_modules/body-parser/node_modules/qs/LICENSE.md +0 -29
  220. package/node_modules/body-parser/node_modules/qs/README.md +0 -758
  221. package/node_modules/body-parser/node_modules/qs/dist/qs.js +0 -141
  222. package/node_modules/body-parser/node_modules/qs/eslint.config.mjs +0 -57
  223. package/node_modules/body-parser/node_modules/qs/lib/formats.js +0 -23
  224. package/node_modules/body-parser/node_modules/qs/lib/index.js +0 -11
  225. package/node_modules/body-parser/node_modules/qs/lib/parse.js +0 -403
  226. package/node_modules/body-parser/node_modules/qs/lib/stringify.js +0 -363
  227. package/node_modules/body-parser/node_modules/qs/lib/utils.js +0 -342
  228. package/node_modules/body-parser/node_modules/qs/package.json +0 -94
  229. package/node_modules/body-parser/node_modules/qs/test/empty-keys-cases.js +0 -267
  230. package/node_modules/body-parser/node_modules/qs/test/parse.js +0 -1703
  231. package/node_modules/body-parser/node_modules/qs/test/stringify.js +0 -1448
  232. package/node_modules/body-parser/node_modules/qs/test/utils.js +0 -432
  233. package/node_modules/uuid/CHANGELOG.md +0 -229
  234. package/node_modules/uuid/CONTRIBUTING.md +0 -18
  235. package/node_modules/uuid/dist/bin/uuid +0 -2
  236. package/node_modules/uuid/dist/esm-node/md5.js +0 -13
  237. package/node_modules/uuid/dist/esm-node/nil.js +0 -1
  238. package/node_modules/uuid/dist/esm-node/parse.js +0 -35
  239. package/node_modules/uuid/dist/esm-node/regex.js +0 -1
  240. package/node_modules/uuid/dist/esm-node/rng.js +0 -12
  241. package/node_modules/uuid/dist/esm-node/sha1.js +0 -13
  242. package/node_modules/uuid/dist/esm-node/stringify.js +0 -29
  243. package/node_modules/uuid/dist/esm-node/v1.js +0 -95
  244. package/node_modules/uuid/dist/esm-node/v3.js +0 -4
  245. package/node_modules/uuid/dist/esm-node/v35.js +0 -64
  246. package/node_modules/uuid/dist/esm-node/v4.js +0 -24
  247. package/node_modules/uuid/dist/esm-node/v5.js +0 -4
  248. package/node_modules/uuid/dist/esm-node/validate.js +0 -7
  249. package/node_modules/uuid/dist/esm-node/version.js +0 -11
  250. package/node_modules/uuid/dist/index.js +0 -79
  251. package/node_modules/uuid/dist/md5-browser.js +0 -223
  252. package/node_modules/uuid/dist/md5.js +0 -23
  253. package/node_modules/uuid/dist/nil.js +0 -8
  254. package/node_modules/uuid/dist/parse.js +0 -45
  255. package/node_modules/uuid/dist/regex.js +0 -8
  256. package/node_modules/uuid/dist/rng-browser.js +0 -26
  257. package/node_modules/uuid/dist/rng.js +0 -24
  258. package/node_modules/uuid/dist/sha1-browser.js +0 -104
  259. package/node_modules/uuid/dist/sha1.js +0 -23
  260. package/node_modules/uuid/dist/stringify.js +0 -39
  261. package/node_modules/uuid/dist/umd/uuid.min.js +0 -1
  262. package/node_modules/uuid/dist/umd/uuidNIL.min.js +0 -1
  263. package/node_modules/uuid/dist/umd/uuidParse.min.js +0 -1
  264. package/node_modules/uuid/dist/umd/uuidStringify.min.js +0 -1
  265. package/node_modules/uuid/dist/umd/uuidValidate.min.js +0 -1
  266. package/node_modules/uuid/dist/umd/uuidVersion.min.js +0 -1
  267. package/node_modules/uuid/dist/umd/uuidv1.min.js +0 -1
  268. package/node_modules/uuid/dist/umd/uuidv3.min.js +0 -1
  269. package/node_modules/uuid/dist/umd/uuidv4.min.js +0 -1
  270. package/node_modules/uuid/dist/umd/uuidv5.min.js +0 -1
  271. package/node_modules/uuid/dist/uuid-bin.js +0 -85
  272. package/node_modules/uuid/dist/v1.js +0 -107
  273. package/node_modules/uuid/dist/v3.js +0 -16
  274. package/node_modules/uuid/dist/v35.js +0 -78
  275. package/node_modules/uuid/dist/v4.js +0 -37
  276. package/node_modules/uuid/dist/v5.js +0 -16
  277. package/node_modules/uuid/dist/validate.js +0 -17
  278. package/node_modules/uuid/dist/version.js +0 -21
  279. package/node_modules/uuid/wrapper.mjs +0 -10
@@ -2,41 +2,46 @@
2
2
  -- This file is auto-generated from README_js.md. Changes should be made there.
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)
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/workflows/browser.yml)
6
6
 
7
- For the creation of [RFC4122](http://www.ietf.org/rfc/rfc4122.txt) UUIDs
7
+ For the creation of [RFC9562](https://www.rfc-editor.org/rfc/rfc9562.html) (formerly [RFC4122](https://www.rfc-editor.org/rfc/rfc4122.html)) UUIDs
8
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
9
+ - **Complete** - Support for all RFC9562 UUID versions
10
+ - **Cross-platform** - Support for...
11
+ - ESM & Common JS
12
+ - [Typescript](#support)
13
+ - [Chrome, Safari, Firefox, and Edge](#support)
14
+ - [NodeJS](#support)
15
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
16
+ - **Secure** - Uses modern `crypto` API for random values
17
+ - **Compact** - Zero-dependency, [tree-shakable](https://developer.mozilla.org/en-US/docs/Glossary/Tree_shaking)
18
+ - **CLI** - [`uuid` command line](#command-line) utility
19
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.
20
+ <!-- prettier-ignore -->
21
+ > [!NOTE]
22
+ > `uuid@11` is now available: See the [CHANGELOG](./CHANGELOG.md) for details. TL;DR:
23
+ > * TypeScript support is now included (remove `@types/uuid` from your dependencies)
24
+ > * Subtle changes to how the `options` arg is interpreted for `v1()`, `v6()`, and `v7()`. [See details](#options-handling-for-timestamp-uuids)
25
+ > * Binary UUIDs are now `Uint8Array`s. (May impact callers of `parse()`, `stringify()`, or that pass an `option#buf` argument to `v1()`-`v7()`.)
21
26
 
22
27
  ## Quickstart
23
28
 
24
- To create a random UUID...
25
-
26
29
  **1. Install**
27
30
 
28
31
  ```shell
29
32
  npm install uuid
30
33
  ```
31
34
 
32
- **2. Create a UUID** (ES6 module syntax)
35
+ **2. Create a UUID**
36
+
37
+ ESM-syntax (must use named exports):
33
38
 
34
39
  ```javascript
35
40
  import { v4 as uuidv4 } from 'uuid';
36
41
  uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'
37
42
  ```
38
43
 
39
- ... or using CommonJS syntax:
44
+ ... CommonJS:
40
45
 
41
46
  ```javascript
42
47
  const { v4: uuidv4 } = require('uuid');
@@ -50,12 +55,18 @@ For timestamp UUIDs, namespace UUIDs, and other options read on ...
50
55
  | | | |
51
56
  | --- | --- | --- |
52
57
  | [`uuid.NIL`](#uuidnil) | The nil UUID string (all zeros) | New in `uuid@8.3` |
58
+ | [`uuid.MAX`](#uuidmax) | The max UUID string (all ones) | New in `uuid@9.1` |
53
59
  | [`uuid.parse()`](#uuidparsestr) | Convert UUID string to array of bytes | New in `uuid@8.3` |
54
60
  | [`uuid.stringify()`](#uuidstringifyarr-offset) | Convert array of bytes to UUID string | New in `uuid@8.3` |
55
61
  | [`uuid.v1()`](#uuidv1options-buffer-offset) | Create a version 1 (timestamp) UUID | |
62
+ | [`uuid.v1ToV6()`](#uuidv1tov6uuid) | Create a version 6 UUID from a version 1 UUID | New in `uuid@10` |
56
63
  | [`uuid.v3()`](#uuidv3name-namespace-buffer-offset) | Create a version 3 (namespace w/ MD5) UUID | |
57
64
  | [`uuid.v4()`](#uuidv4options-buffer-offset) | Create a version 4 (random) UUID | |
58
65
  | [`uuid.v5()`](#uuidv5name-namespace-buffer-offset) | Create a version 5 (namespace w/ SHA-1) UUID | |
66
+ | [`uuid.v6()`](#uuidv6options-buffer-offset) | Create a version 6 (timestamp, reordered) UUID | New in `uuid@10` |
67
+ | [`uuid.v6ToV1()`](#uuidv6tov1uuid) | Create a version 1 UUID from a version 6 UUID | New in `uuid@10` |
68
+ | [`uuid.v7()`](#uuidv7options-buffer-offset) | Create a version 7 (Unix Epoch time-based) UUID | New in `uuid@10` |
69
+ | ~~[`uuid.v8()`](#uuidv8)~~ | "Intentionally left blank" | |
59
70
  | [`uuid.validate()`](#uuidvalidatestr) | Test a string to see if it is a valid UUID | New in `uuid@8.3` |
60
71
  | [`uuid.version()`](#uuidversionstr) | Detect RFC version of a UUID | New in `uuid@8.3` |
61
72
 
@@ -73,6 +84,18 @@ import { NIL as NIL_UUID } from 'uuid';
73
84
  NIL_UUID; // ⇨ '00000000-0000-0000-0000-000000000000'
74
85
  ```
75
86
 
87
+ ### uuid.MAX
88
+
89
+ The max UUID string (all ones).
90
+
91
+ Example:
92
+
93
+ ```javascript
94
+ import { MAX as MAX_UUID } from 'uuid';
95
+
96
+ MAX_UUID; // ⇨ 'ffffffff-ffff-ffff-ffff-ffffffffffff'
97
+ ```
98
+
76
99
  ### uuid.parse(str)
77
100
 
78
101
  Convert UUID string to array of bytes
@@ -83,7 +106,9 @@ Convert UUID string to array of bytes
83
106
  | _returns_ | `Uint8Array[16]` |
84
107
  | _throws_ | `TypeError` if `str` is not a valid UUID |
85
108
 
86
- Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left &Rarr; right order of hex-pairs in UUID strings. As shown in the example below.
109
+ <!-- prettier-ignore -->
110
+ > [!NOTE]
111
+ > Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left &Rarr; right order of hex-pairs in UUID strings. As shown in the example below.
87
112
 
88
113
  Example:
89
114
 
@@ -91,16 +116,13 @@ Example:
91
116
  import { parse as uuidParse } from 'uuid';
92
117
 
93
118
  // 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
- // ]
119
+ uuidParse('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨
120
+ // Uint8Array(16) [
121
+ // 110, 192, 189, 127, 17,
122
+ // 192, 67, 218, 151, 94,
123
+ // 42, 138, 217, 235, 174,
124
+ // 11
125
+ // ]
104
126
  ```
105
127
 
106
128
  ### uuid.stringify(arr[, offset])
@@ -114,14 +136,16 @@ Convert array of bytes to UUID string
114
136
  | _returns_ | `String` |
115
137
  | _throws_ | `TypeError` if a valid UUID string cannot be generated |
116
138
 
117
- Note: Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left &Rarr; right order of hex-pairs in UUID strings. As shown in the example below.
139
+ <!-- prettier-ignore -->
140
+ > [!NOTE]
141
+ > Ordering of values in the byte arrays used by `parse()` and `stringify()` follows the left &Rarr; right order of hex-pairs in UUID strings. As shown in the example below.
118
142
 
119
143
  Example:
120
144
 
121
145
  ```javascript
122
146
  import { stringify as uuidStringify } from 'uuid';
123
147
 
124
- const uuidBytes = [
148
+ const uuidBytes = Uint8Array.of(
125
149
  0x6e,
126
150
  0xc0,
127
151
  0xbd,
@@ -137,8 +161,8 @@ const uuidBytes = [
137
161
  0xd9,
138
162
  0xeb,
139
163
  0xae,
140
- 0x0b,
141
- ];
164
+ 0x0b
165
+ );
142
166
 
143
167
  uuidStringify(uuidBytes); // ⇨ '6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'
144
168
  ```
@@ -150,27 +174,31 @@ Create an RFC version 1 (timestamp) UUID
150
174
  | | |
151
175
  | --- | --- |
152
176
  | [`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) |
177
+ | [`options.node = (random)` ] | RFC "node" field as an `Array[6]` of byte values (per 4.1.6) |
178
+ | [`options.clockseq = (random)`] | RFC "clock sequence" as a `Number` between 0 - 0x3fff |
179
+ | [`options.msecs = (current time)`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) |
180
+ | [`options.nsecs = 0`] | RFC "timestamp" field (`Number` of nanoseconds to add to `msecs`, should be 0-10,000) |
181
+ | [`options.random = (random)`] | `Array` of 16 random bytes (0-255) used to generate other fields, above |
158
182
  | [`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` |
183
+ | [`buffer`] | `Uint8Array` or `Uint8Array` subtype (e.g. Node.js `Buffer`). If provided, binary UUID is written into the array, starting at `offset` |
160
184
  | [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` |
161
185
  | _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` |
162
186
  | _throws_ | `Error` if more than 10M UUIDs/sec are requested |
163
187
 
164
- 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.
188
+ <!-- prettier-ignore -->
189
+ > [!NOTE]
190
+ > The default [node id](https://datatracker.ietf.org/doc/html/rfc9562#section-5.1) (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
191
 
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.
192
+ <!-- prettier-ignore -->
193
+ > [!NOTE]
194
+ > `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
195
 
168
196
  Example:
169
197
 
170
198
  ```javascript
171
199
  import { v1 as uuidv1 } from 'uuid';
172
200
 
173
- uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-8bad-9b1deb4d3b7d'
201
+ uuidv1(); // ⇨ '2c5ea4c0-4067-11e9-9bdd-2b0d7b3dcb6d'
174
202
  ```
175
203
 
176
204
  Example using `options`:
@@ -178,13 +206,23 @@ Example using `options`:
178
206
  ```javascript
179
207
  import { v1 as uuidv1 } from 'uuid';
180
208
 
181
- const v1options = {
182
- node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],
209
+ const options = {
210
+ node: Uint8Array.of(0x01, 0x23, 0x45, 0x67, 0x89, 0xab),
183
211
  clockseq: 0x1234,
184
212
  msecs: new Date('2011-11-01').getTime(),
185
213
  nsecs: 5678,
186
214
  };
187
- uuidv1(v1options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab'
215
+ uuidv1(options); // ⇨ '710b962e-041c-11e1-9234-0123456789ab'
216
+ ```
217
+
218
+ ### uuid.v1ToV6(uuid)
219
+
220
+ Convert a UUID from version 1 to version 6
221
+
222
+ ```javascript
223
+ import { v1ToV6 } from 'uuid';
224
+
225
+ v1ToV6('92f62d9e-22c4-11ef-97e9-325096b39f47'); // ⇨ '1ef22c49-2f62-6d9e-97e9-325096b39f47'
188
226
  ```
189
227
 
190
228
  ### uuid.v3(name, namespace[, buffer[, offset]])
@@ -193,7 +231,9 @@ Create an RFC version 3 (namespace w/ MD5) UUID
193
231
 
194
232
  API is identical to `v5()`, but uses "v3" instead.
195
233
 
196
- &#x26a0;&#xfe0f; Note: Per the RFC, "_If backward compatibility is not an issue, SHA-1 [Version 5] is preferred_."
234
+ <!-- prettier-ignore -->
235
+ > [!IMPORTANT]
236
+ > Per the RFC, "_If backward compatibility is not an issue, SHA-1 [Version 5] is preferred_."
197
237
 
198
238
  ### uuid.v4([options[, buffer[, offset]]])
199
239
 
@@ -204,7 +244,7 @@ Create an RFC version 4 (random) UUID
204
244
  | [`options`] | `Object` with one or more of the following properties: |
205
245
  | [`options.random`] | `Array` of 16 random bytes (0-255) |
206
246
  | [`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` |
247
+ | [`buffer`] | `Uint8Array` or `Uint8Array` subtype (e.g. Node.js `Buffer`). If provided, binary UUID is written into the array, starting at `offset` |
208
248
  | [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` |
209
249
  | _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` |
210
250
 
@@ -213,7 +253,7 @@ Example:
213
253
  ```javascript
214
254
  import { v4 as uuidv4 } from 'uuid';
215
255
 
216
- uuidv4(); // ⇨ '1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed'
256
+ uuidv4(); // ⇨ '9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d'
217
257
  ```
218
258
 
219
259
  Example using predefined `random` values:
@@ -222,7 +262,7 @@ Example using predefined `random` values:
222
262
  import { v4 as uuidv4 } from 'uuid';
223
263
 
224
264
  const v4options = {
225
- random: [
265
+ random: Uint8Array.of(
226
266
  0x10,
227
267
  0x91,
228
268
  0x56,
@@ -238,8 +278,8 @@ const v4options = {
238
278
  0x67,
239
279
  0x1c,
240
280
  0x58,
241
- 0x36,
242
- ],
281
+ 0x36
282
+ ),
243
283
  };
244
284
  uuidv4(v4options); // ⇨ '109156be-c4fb-41ea-b1b4-efe1671c5836'
245
285
  ```
@@ -252,11 +292,13 @@ Create an RFC version 5 (namespace w/ SHA-1) UUID
252
292
  | --- | --- |
253
293
  | `name` | `String \| Array` |
254
294
  | `namespace` | `String \| Array[16]` Namespace UUID |
255
- | [`buffer`] | `Array \| Buffer` If specified, uuid will be written here in byte-form, starting at `offset` |
295
+ | [`buffer`] | `Uint8Array` or `Uint8Array` subtype (e.g. Node.js `Buffer`). If provided, binary UUID is written into the array, starting at `offset` |
256
296
  | [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` |
257
297
  | _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` |
258
298
 
259
- Note: The RFC `DNS` and `URL` namespaces are available as `v5.DNS` and `v5.URL`.
299
+ <!-- prettier-ignore -->
300
+ > [!NOTE]
301
+ > The RFC `DNS` and `URL` namespaces are available as `v5.DNS` and `v5.URL`.
260
302
 
261
303
  Example with custom namespace:
262
304
 
@@ -278,6 +320,73 @@ import { v5 as uuidv5 } from 'uuid';
278
320
  uuidv5('https://www.w3.org/', uuidv5.URL); // ⇨ 'c106a26a-21bb-5538-8bf2-57095d1976c1'
279
321
  ```
280
322
 
323
+ ### uuid.v6([options[, buffer[, offset]]])
324
+
325
+ Create an RFC version 6 (timestamp, reordered) UUID
326
+
327
+ This method takes the same arguments as uuid.v1().
328
+
329
+ ```javascript
330
+ import { v6 as uuidv6 } from 'uuid';
331
+
332
+ uuidv6(); // ⇨ '1e940672-c5ea-64c0-9b5d-ab8dfbbd4bed'
333
+ ```
334
+
335
+ Example using `options`:
336
+
337
+ ```javascript
338
+ import { v6 as uuidv6 } from 'uuid';
339
+
340
+ const options = {
341
+ node: [0x01, 0x23, 0x45, 0x67, 0x89, 0xab],
342
+ clockseq: 0x1234,
343
+ msecs: new Date('2011-11-01').getTime(),
344
+ nsecs: 5678,
345
+ };
346
+ uuidv6(options); // ⇨ '1e1041c7-10b9-662e-9234-0123456789ab'
347
+ ```
348
+
349
+ ### uuid.v6ToV1(uuid)
350
+
351
+ Convert a UUID from version 6 to version 1
352
+
353
+ ```javascript
354
+ import { v6ToV1 } from 'uuid';
355
+
356
+ v6ToV1('1ef22c49-2f62-6d9e-97e9-325096b39f47'); // ⇨ '92f62d9e-22c4-11ef-97e9-325096b39f47'
357
+ ```
358
+
359
+ ### uuid.v7([options[, buffer[, offset]]])
360
+
361
+ Create an RFC version 7 (random) UUID
362
+
363
+ | | |
364
+ | --- | --- |
365
+ | [`options`] | `Object` with one or more of the following properties: |
366
+ | [`options.msecs = (current time)`] | RFC "timestamp" field (`Number` of milliseconds, unix epoch) |
367
+ | [`options.random = (random)`] | `Array` of 16 random bytes (0-255) used to generate other fields, above |
368
+ | [`options.rng`] | Alternative to `options.random`, a `Function` that returns an `Array` of 16 random bytes (0-255) |
369
+ | [`options.seq = (random)`] | 32-bit sequence `Number` between 0 - 0xffffffff. This may be provided to help ensure uniqueness for UUIDs generated within the same millisecond time interval. Default = random value. |
370
+ | [`buffer`] | `Uint8Array` or `Uint8Array` subtype (e.g. Node.js `Buffer`). If provided, binary UUID is written into the array, starting at `offset` |
371
+ | [`offset` = 0] | `Number` Index to start writing UUID bytes in `buffer` |
372
+ | _returns_ | UUID `String` if no `buffer` is specified, otherwise returns `buffer` |
373
+
374
+ Example:
375
+
376
+ ```javascript
377
+ import { v7 as uuidv7 } from 'uuid';
378
+
379
+ uuidv7(); // ⇨ '01695553-c90c-705a-b56d-778dfbbd4bed'
380
+ ```
381
+
382
+ ### ~~uuid.v8()~~
383
+
384
+ **_"Intentionally left blank"_**
385
+
386
+ <!-- prettier-ignore -->
387
+ > [!NOTE]
388
+ > Version 8 (experimental) UUIDs are "[for experimental or vendor-specific use cases](https://www.rfc-editor.org/rfc/rfc9562.html#name-uuid-version-8)". The RFC does not define a creation algorithm for them, which is why this package does not offer a `v8()` method. The `validate()` and `version()` methods do work with such UUIDs, however.
389
+
281
390
  ### uuid.validate(str)
282
391
 
283
392
  Test a string to see if it is a valid UUID
@@ -332,19 +441,23 @@ uuidVersion('45637ec4-c85f-11ea-87d0-0242ac130003'); // ⇨ 1
332
441
  uuidVersion('6ec0bd7f-11c0-43da-975e-2a8ad9ebae0b'); // ⇨ 4
333
442
  ```
334
443
 
444
+ <!-- prettier-ignore -->
445
+ > [!NOTE]
446
+ > This method returns `0` for the `NIL` UUID, and `15` for the `MAX` UUID.
447
+
335
448
  ## Command Line
336
449
 
337
450
  UUIDs can be generated from the command line using `uuid`.
338
451
 
339
452
  ```shell
340
- $ uuid
453
+ $ npx uuid
341
454
  ddeb27fb-d9a0-4624-be4d-4615062daed4
342
455
  ```
343
456
 
344
457
  The default is to generate version 4 UUIDS, however the other versions are supported. Type `uuid --help` for details:
345
458
 
346
459
  ```shell
347
- $ uuid --help
460
+ $ npx uuid --help
348
461
 
349
462
  Usage:
350
463
  uuid
@@ -352,77 +465,37 @@ Usage:
352
465
  uuid v3 <name> <namespace uuid>
353
466
  uuid v4
354
467
  uuid v5 <name> <namespace uuid>
468
+ uuid v7
355
469
  uuid --help
356
470
 
357
471
  Note: <namespace uuid> may be "URL" or "DNS" to use the corresponding UUIDs
358
- defined by RFC4122
472
+ defined by RFC9562
359
473
  ```
360
474
 
361
- ## ECMAScript Modules
475
+ ## `options` Handling for Timestamp UUIDs
362
476
 
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).
477
+ Prior to `uuid@11`, it was possible for `options` state to interfere with the internal state used to ensure uniqueness of timestamp-based UUIDs (the `v1()`, `v6()`, and `v7()` methods). Starting with `uuid@11`, this issue has been addressed by using the presence of the `options` argument as a flag to select between two possible behaviors:
364
478
 
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
- ```
479
+ - Without `options`: Internal state is utilized to improve UUID uniqueness.
480
+ - With `options`: Internal state is **NOT** used and, instead, appropriate defaults are applied as needed.
375
481
 
376
- ## CDN Builds
482
+ ## Support
377
483
 
378
- ### ECMAScript Modules
484
+ **Browsers**: `uuid` [builds are tested](/uuidjs/uuid/blob/main/wdio.conf.js) against the latest version of desktop Chrome, Safari, Firefox, and Edge. Mobile versions of these same browsers are expected to work but aren't currently tested.
379
485
 
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/):
486
+ **Node**: `uuid` [builds are tested](https://github.com/uuidjs/uuid/blob/main/.github/workflows/ci.yml#L26-L27) against node ([LTS releases](https://github.com/nodejs/Release)), plus one prior. E.g. `node@18` is in maintainence mode, and `node@22` is the current LTS release. So `uuid` supports `node@16`-`node@22`.
381
487
 
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/)**:
488
+ **Typescript**: TS versions released within the past two years are supported. [source](https://github.com/microsoft/TypeScript/issues/49088#issuecomment-2468723715)
394
489
 
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/)**:
490
+ ## Known issues
400
491
 
401
- ```html
402
- <script src="https://cdn.jsdelivr.net/npm/uuid@latest/dist/umd/uuidv4.min.js"></script>
403
- ```
492
+ <!-- This header is referenced as an anchor in src/rng-browser.ts -->
404
493
 
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"
494
+ ### "getRandomValues() not supported"
422
495
 
423
496
  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
497
 
425
- ### React Native / Expo
498
+ #### React Native / Expo
426
499
 
427
500
  1. Install [`react-native-get-random-values`](https://github.com/LinusU/react-native-get-random-values#readme)
428
501
  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:
@@ -432,74 +505,6 @@ import 'react-native-get-random-values';
432
505
  import { v4 as uuidv4 } from 'uuid';
433
506
  ```
434
507
 
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`.
508
+ ---
503
509
 
504
- ----
505
- Markdown generated from [README_js.md](README_js.md) by [![RunMD Logo](http://i.imgur.com/h0FVyzU.png)](https://github.com/broofa/runmd)
510
+ Markdown generated from [README_js.md](README_js.md) by <a href="https://github.com/broofa/runmd"><image height="13" src="https://camo.githubusercontent.com/5c7c603cd1e6a43370b0a5063d457e0dabb74cf317adc7baba183acb686ee8d0/687474703a2f2f692e696d6775722e636f6d2f634a4b6f3662552e706e67" /></a>
@@ -0,0 +1,15 @@
1
+ export type * from './types.js';
2
+ export { default as MAX } from './max.js';
3
+ export { default as NIL } from './nil.js';
4
+ export { default as parse } from './parse.js';
5
+ export { default as stringify } from './stringify.js';
6
+ export { default as v1 } from './v1.js';
7
+ export { default as v1ToV6 } from './v1ToV6.js';
8
+ export { default as v3 } from './v3.js';
9
+ export { default as v4 } from './v4.js';
10
+ export { default as v5 } from './v5.js';
11
+ export { default as v6 } from './v6.js';
12
+ export { default as v6ToV1 } from './v6ToV1.js';
13
+ export { default as v7 } from './v7.js';
14
+ export { default as validate } from './validate.js';
15
+ export { default as version } from './version.js';
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.version = exports.validate = exports.v7 = exports.v6ToV1 = exports.v6 = exports.v5 = exports.v4 = exports.v3 = exports.v1ToV6 = exports.v1 = exports.stringify = exports.parse = exports.NIL = exports.MAX = void 0;
4
+ var max_js_1 = require("./max.js");
5
+ Object.defineProperty(exports, "MAX", { enumerable: true, get: function () { return max_js_1.default; } });
6
+ var nil_js_1 = require("./nil.js");
7
+ Object.defineProperty(exports, "NIL", { enumerable: true, get: function () { return nil_js_1.default; } });
8
+ var parse_js_1 = require("./parse.js");
9
+ Object.defineProperty(exports, "parse", { enumerable: true, get: function () { return parse_js_1.default; } });
10
+ var stringify_js_1 = require("./stringify.js");
11
+ Object.defineProperty(exports, "stringify", { enumerable: true, get: function () { return stringify_js_1.default; } });
12
+ var v1_js_1 = require("./v1.js");
13
+ Object.defineProperty(exports, "v1", { enumerable: true, get: function () { return v1_js_1.default; } });
14
+ var v1ToV6_js_1 = require("./v1ToV6.js");
15
+ Object.defineProperty(exports, "v1ToV6", { enumerable: true, get: function () { return v1ToV6_js_1.default; } });
16
+ var v3_js_1 = require("./v3.js");
17
+ Object.defineProperty(exports, "v3", { enumerable: true, get: function () { return v3_js_1.default; } });
18
+ var v4_js_1 = require("./v4.js");
19
+ Object.defineProperty(exports, "v4", { enumerable: true, get: function () { return v4_js_1.default; } });
20
+ var v5_js_1 = require("./v5.js");
21
+ Object.defineProperty(exports, "v5", { enumerable: true, get: function () { return v5_js_1.default; } });
22
+ var v6_js_1 = require("./v6.js");
23
+ Object.defineProperty(exports, "v6", { enumerable: true, get: function () { return v6_js_1.default; } });
24
+ var v6ToV1_js_1 = require("./v6ToV1.js");
25
+ Object.defineProperty(exports, "v6ToV1", { enumerable: true, get: function () { return v6ToV1_js_1.default; } });
26
+ var v7_js_1 = require("./v7.js");
27
+ Object.defineProperty(exports, "v7", { enumerable: true, get: function () { return v7_js_1.default; } });
28
+ var validate_js_1 = require("./validate.js");
29
+ Object.defineProperty(exports, "validate", { enumerable: true, get: function () { return validate_js_1.default; } });
30
+ var version_js_1 = require("./version.js");
31
+ Object.defineProperty(exports, "version", { enumerable: true, get: function () { return version_js_1.default; } });
@@ -0,0 +1,2 @@
1
+ declare const _default: "ffffffff-ffff-ffff-ffff-ffffffffffff";
2
+ export default _default;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = 'ffffffff-ffff-ffff-ffff-ffffffffffff';
@@ -0,0 +1,4 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ declare function md5(bytes: Uint8Array): Buffer;
4
+ export default md5;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const crypto_1 = require("crypto");
4
+ function md5(bytes) {
5
+ if (Array.isArray(bytes)) {
6
+ bytes = Buffer.from(bytes);
7
+ }
8
+ else if (typeof bytes === 'string') {
9
+ bytes = Buffer.from(bytes, 'utf8');
10
+ }
11
+ return (0, crypto_1.createHash)('md5').update(bytes).digest();
12
+ }
13
+ exports.default = md5;
@@ -0,0 +1,6 @@
1
+ /// <reference types="node" />
2
+ import { randomUUID } from 'crypto';
3
+ declare const _default: {
4
+ randomUUID: typeof randomUUID;
5
+ };
6
+ export default _default;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const crypto_1 = require("crypto");
4
+ exports.default = { randomUUID: crypto_1.randomUUID };
@@ -0,0 +1,2 @@
1
+ declare const _default: "00000000-0000-0000-0000-000000000000";
2
+ export default _default;