---
title: toUuid
framework: CKTool JS
role: symbol
role_heading: Type Method
platforms: [cktool js 1.2.15+]
path: cktooljs/cktooldatabasemodule/touuid
---

# toUuid

Converts a string to a Uuid.

## Declaration

```data
static Uuid toUuid();
```

## Parameters

- `value`: A string to convert or validate.

## Return Value

Return Value If the value passes validation, this function returns a Uuid; otherwise it throws ValueNotUuidError. A string passes validation if it is a UUID string.

## Discussion

Discussion In TypeScript, Uuid is a branded string type. In JavaScript, it’s a string. import { toUuid } from "@apple/cktool.database";
