utils/uuid
Documentation
- source: utils/uuid.ts
Overview
Classes
UUID
random()
Generates a new random UUID (Type 4). The generated string is typically in the format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx.
tsstatic random(): string;Returns
- Type:
string- Description: A string representing the newly generated UUID.
validate()
Validates if the provided string conforms to the standard UUID format (e.g., a valid 36-character string including hyphens).
tsstatic validate(input: string): boolean;
Parameter Type Description inputstringThe string to validate. Returns
- Type:
boolean- Description: true if the input string is a valid UUID, false otherwise.
