Changelog
v5.1.0 - 2024-05-12
UUID.genV6()
as stableChangelog
v4.2.14
Last version that:
UUID
in global scopenode:crypto
-based cryptographically secure pseudorandom number
generator on Node.jsChangelog
v5.0.1 - 2023-03-30
Changelog
v5.0.0 - 2023-01-28
UUID
export and removed default exportUUID.overwrittenUUID
property (a.k.a. no conflict mode)node:crypto
module-based CSPRNG implementation
UUID.parse()
: UUID
-> UUID | null
UUID
class members
UUID.FIELD_NAMES
, UUID.FIELD_SIZES
, UUID#intFields
,
UUID#bitFields
, and UUID#hexFields
as read-only arrays/objectsImport the UUID
class using the ESM syntax:
<!-- HTML5 -->
-<script src="https://unpkg.com/uuidjs@^4"></script>
-<script>
+<script type="module">
+ import { UUID } from "https://unpkg.com/uuidjs@^5";
const uuid = UUID.generate();
</script>
// Node.js
-const UUID = require("uuidjs");
+import { UUID } from "uuidjs";
const uuid = UUID.generate();
Call static methods through the UUID
class, rather than importing them
directly:
// Node.js
-const { generate } = require("uuidjs");
-const uuid = generate();
+import { UUID } from "uuidjs";
+const uuid = UUID.generate();
Run type checking relating to the following items, as these items have different type declarations than those in v4:
UUID.parse()
UUID.FIELD_NAMES
UUID.FIELD_SIZES
new UUID()
UUID#intFields
UUID#bitFields
UUID#hexFields