$uuid
Updated on Aug 29, 2025 3 minutes to readThe UUID Plugin provides methods to generate universally unique identifiers (UUIDs) of different versions.
Methods
Method | Description |
---|---|
v1 | Generates a version 1 UUID (timestamp-based). Version 1 UUIDs are based on the current timestamp and the machine's MAC address. |
v4 | Generates a version 4 UUID (random). Version 4 UUIDs are purely random. |
ordered | Returns a combined time-GUID version that starts with the current time, followed by randomness. |
Methods Details
v1()
• Type
() => string
• Details
Generates a version 1 UUID (timestamp-based). Version 1 UUIDs are based on the current timestamp and the machine's MAC address.
Returns a string representing the UUID.
v4()
• Type
() => string
• Details
Generates a version 4 UUID (random). Version 4 UUIDs are purely random.
Returns a string representing the UUID.
ordered()
• Type
() => string
• Details
Generates an ordered UUID — a combined time-GUID version that starts with the current time, followed by randomness.
Returns a string representing the UUID.