Type Alias: UUIDVersion1Options
UUIDVersion1Options =
object
The options of a version 1 (time-based) UUID. Without options, the UUIDs of the process share a state: the timestamp is the current time, a counter keeps the UUIDs created in the same millisecond unique and ordered, and the node and clock sequence are random, drawn once. Given any option, the UUID is built from the options alone: the missing time is the current one, the missing node and clock sequence come from the random bytes, and two UUIDs created with the same options in the same millisecond may be equal.
Properties
_v6?
optional_v6?:boolean
Internal: set by the version 6 generation, to draw a new node and clock sequence for each UUID. Do not set it.
clockseq?
optionalclockseq?:number
The clock sequence, an integer from 0 to 0x3fff (14 bits); a greater value overwrites the variant bits.
Default
randommsecs?
optionalmsecs?:number
The time of the UUID, in milliseconds since the Unix epoch.
Default
Date.now()node?
optionalnode?:Uint8Array
The node ID, its first 6 bytes (traditionally a MAC address).
Default
6 random bytesnsecs?
optionalnsecs?:number
The 100-nanosecond intervals added to msecs, an integer from 0 to 9999.
Default
0random?
optionalrandom?:Uint8Array
16 random bytes (or more, fewer make the generation throw an Error), used for the node and the clock sequence when they are not given; it takes precedence over rng.
Default
bytes from the cryptographic random generator of Node.jsrng?
optionalrng?: () =>Uint8Array
A function returning 16 random bytes (or more), called when random is not given.
Returns
Uint8Array
Default
the cryptographic random generator of Node.js