namespace v1
Functions
f
v1.generate(): string | number[]
options?: V1Options | null,
buf?: number[],
offset?: number
Generates a RFC4122 v1 UUID (time-based).
f
v1.validate(id: string): boolean
Validates the UUID v1.
Interfaces
I
The options used for generating a v1 UUID in generate.
- clockseq: number
A 14-bit value used to avoid duplicates that could arise when the clock is set backwards in time or if the node ID changes (0 - 16383).
- msecs: number
The number of milliseconds since the Unix epoch (January 1, 1970).
- node: number[]
An array of 6 bytes that represents a 48-bit IEEE 802 MAC address.
- nsecs: number
The number of nanoseconds to add to
V1Options.msecs(0 - 10,000). - random: number[]
An array of 16 random bytes (0 - 255).
- rng: () => number[]
A function that returns an array of 16 random bytes (0 - 255). Alternative to
V1Options.random.