v6
v6(
options?):string
Defined in: src/uuid/v6.ts:22
Version 6 — the v1 fields reordered so byte order matches time order (RFC 9562 §5.6).
Identical information to v1, laid out most-significant-first, which makes it sort chronologically as a string or as bytes. §5.6 recommends it over v1 for systems that already depend on v1’s node and clock-sequence fields; for everything else §5.7 recommends v7.
Parameters
Section titled “Parameters”options?
Section titled “options?”TimeUuidOptions = {}
Returns
Section titled “Returns”string
Example
Section titled “Example”v6(); // "1ec9414c-232a-6b00-b3c8-9f6bdeced846"
// Sorts in creation order, which v1 does not.[v6(), v6(), v6()].sort(); // still in the order they were made