_.toFinite(value)

sourcenpm package

Converts value to a finite number.

Since

4.12.0

Arguments

  • value (*): The value to convert.

Returns

(number): Returns the converted number.

Example

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