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

# toNumber

Converts a supported numeric type to a JavaScript number.

## Declaration

```data
static number toNumber();
```

## Parameters

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

## Discussion

Discussion If the value passed in isn’t a number, this function throws ValueNotNumericError. If the value is numeric but can’t be represented by a JavaScript number, it throws ValueNotInNumberRangeError. import { toNumber } from "@apple/cktool.database";
