@elizaos/core v1.0.6 / v1 / asUUID
Function: asUUID()
asUUID(
id
): `${string}-${string}-${string}-${string}-${string}`
Helper function to safely cast a string to strongly typed UUID Wraps V2's validateUuid function
Parameters​
• id: string
The string UUID to validate and cast
Returns​
`${string}-${string}-${string}-${string}-${string}`
The same UUID with branded type information
Throws​
Error if the UUID format is invalid