Skip to content

UUID

Generate unique identifiers

UUID provides methods to generate universally unique identifiers (UUIDs).

Use UUID to generate unique strings for:

Examples

javascript
let id = UUID.string();
console.log(id); // "A1B2C3D4-E5F6-7890-ABCD-EF1234567890"
javascript
let record = {
    id: UUID.string(),
    name: "John",
    created: new Date()
};

Methods

string

Generate a new UUID string

typescript
static string(): string

Returns: UUID in standard format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx)

Example:

javascript
UUID.string()