# toInt

URL: https://caijiao.org/radash/number/to-int
Source: docs/radash/number/to-int.md
Description: 尽可能将值转换为整数 '_.toInt'函数会尽力将给定的值转换为整数

尽可能将值转换为整数


## 基本用法

`_.toInt`函数会尽力将给定的值转换为整数。

```ts
import { toInt } from 'radash'

toInt(0) // => 0
toInt(null) // => 0
toInt(null, 3) // => 3
```
