Lodash

是一个一致性、模块化、高性能的 JavaScript 实用工具库。

“Lang” Methods

_.toFinite(value)

转换 value 为一个有限数字。

添加版本

4.12.0

参数

  1. value (*): 要转换的值。

返回

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

例子

_.toFinite(3.2);
// => 3.2
 
_.toFinite(Number.MIN_VALUE);
// => 5e-324
 
_.toFinite(Infinity);
// => 1.7976931348623157e+308
 
_.toFinite('3.2');
// => 3.2

数组 Array

集合 Collection

日期 Date

函数 Function

Lang

数学 Math

数字 Number

对象 Object

Seq

字符串 String

实用函数 Util

Properties

Methods