> For the complete documentation index, see [llms.txt](https://lodash.shujuwajue.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lodash.shujuwajue.com/lang/tofinite.md).

# \_.toFinite（强转为有限数字）

**语法：**

```javascript
_.toFinite(value)
```

**源代码链接：**[source](https://github.com/lodash/lodash/blob/4.17.10/lodash.js#L12357)

**npm包链接：**[npm package](https://www.npmjs.com/package/lodash.tofinite)

**描述：**

转换`value`为一个有限数字。

**开始版本：**&#x34;.12.0

**参数：**

* `value (*)`: 要转换的值。

**返回值：**

* `(number)`: 返回转换后的数字。

**例子：**

```javascript
_.toFinite(3.2);
// => 3.2

_.toFinite(Number.MIN_VALUE);
// => 5e-324

_.toFinite(Infinity);
// => 1.7976931348623157e+308

_.toFinite('3.2');
// => 3.2
```
