Skip to main content

@elizaos/core v1.0.0-beta.7 / asUUID

Function: asUUID()

asUUID(id): `${string}-${string}-${string}-${string}-${string}`

Helper function to safely cast a string to strongly typed UUID

Parameters

id: string

The string UUID to validate and cast

Returns

`${string}-${string}-${string}-${string}-${string}`

The same UUID with branded type information

Defined in

packages/core/src/types.ts:17