v2
v2(
localDomain,localId,options?):string
Defined in: src/uuid/v2.ts:22
Version 2 — DCE Security, defined by DCE 1.1 rather than RFC 9562.
RFC 9562 §4.1 lists version 2 as reserved and does not specify it. It replaces the low 32 bits of the v1 timestamp with a local ID and the low byte of the clock sequence with a domain, which leaves roughly one distinct value per 7 minutes per node. Included for completeness; do not choose it for new work.
Parameters
Section titled “Parameters”localDomain
Section titled “localDomain”number
localId
Section titled “localId”number
options?
Section titled “options?”TimeUuidOptions = {}
Returns
Section titled “Returns”string
Example
Section titled “Example”v2(DCE_DOMAIN.PERSON, 1000); // "000003e8-9414-21ec-8400-9f6bdeced846"v2(DCE_DOMAIN.GROUP, 20);v2(DCE_DOMAIN.ORG, 42);