Options
All
  • Public
  • Public/Protected
  • All
Menu

Module toNumber

Index

References

Functions Lang

References

Renames and re-exports __type

Lang Functions

  • toNumber(value: any): number
  • Converts value to a number.

    since

    5.0.0

    see

    [[isInteger]],toInteger,isNumber

    example
    toNumber(3.2)
    // => 3.2

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

    toNumber(Infinity)
    // => Infinity

    toNumber('3.2')
    // => 3.2

    Parameters

    • value: any

      The value to process.

    Returns number

    Returns the number.