Function default

  • Converts value to a finite number.

    Parameters

    • value: any

      The value to convert.

    Returns number

    Returns the converted number.

    5.5.0

    toFinite(3.2)
    // => 3.2

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

    toFinite(Infinity)
    // => 1.7976931348623157e+308

    toFinite('3.2')
    // => 3.2