> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qu.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# getNumber

> **注意**: 此页面尚未翻译成中文。以下内容为英文原版。

```ts theme={null}
function getNumber(value, name?): number
```

Gets a number from `value`. If it is an invalid value for a number, then an ArgumentError will be thrown for `name`.

## Parameters

| Parameter | Type | Description |
| :- | :- | :- |
| `value` | [`BigNumberish`](https://docs.qu.ai/cn/sdk/content/type-aliases/BigNumberish) | The value to convert. |
| `name`? | `string` | The name of the value. |

## Returns

`number`

The value.

## Throws

If the value is invalid.

## Throws

If the value is too large.

## Source

[utils/maths.ts:212](https://github.com/dominant-strategies/quais.js/blob/c1c12d43f9d34c6baad2b0542bd6d0acd6fefcbf/src/utils/maths.ts#L212)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.