NumberConstructor | typescript
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • NumberConstructor

Index

Properties

EPSILON

EPSILON: number

The value of Number.EPSILON is the difference between 1 and the smallest value greater than 1 that is representable as a Number value, which is approximately: 2.2204460492503130808472633361816 x 10‍−‍16.

MAX_SAFE_INTEGER

MAX_SAFE_INTEGER: number

The value of the largest integer n such that n and n + 1 are both exactly representable as a Number value. The value of Number.MAX_SAFE_INTEGER is 9007199254740991 2^53 − 1.

MIN_SAFE_INTEGER

MIN_SAFE_INTEGER: number

The value of the smallest integer n such that n and n − 1 are both exactly representable as a Number value. The value of Number.MIN_SAFE_INTEGER is −9007199254740991 (−(2^53 − 1)).

Methods

isFinite

  • isFinite(number: number): boolean
  • Returns true if passed value is finite. Unlike the global isFinite, Number.isFinite doesn't forcibly convert the parameter to a number. Only finite values of the type number, result in true.

    Parameters

    • number: number

      A numeric value.

    Returns boolean

isInteger

  • isInteger(number: number): boolean
  • Returns true if the value passed is an integer, false otherwise.

    Parameters

    • number: number

      A numeric value.

    Returns boolean

isNaN

  • isNaN(number: number): boolean
  • Returns a Boolean value that indicates whether a value is the reserved value NaN (not a number). Unlike the global isNaN(), Number.isNaN() doesn't forcefully convert the parameter to a number. Only values of the type number, that are also NaN, result in true.

    Parameters

    • number: number

      A numeric value.

    Returns boolean

isSafeInteger

  • isSafeInteger(number: number): boolean
  • Returns true if the value passed is a safe integer.

    Parameters

    • number: number

      A numeric value.

    Returns boolean

parseFloat

  • parseFloat(string: string): number
  • Converts a string to a floating-point number.

    Parameters

    • string: string

      A string that contains a floating-point number.

    Returns number

parseInt

  • parseInt(string: string, radix?: number): number
  • Converts A string to an integer.

    Parameters

    • string: string
    • Optional radix: number

      A value between 2 and 36 that specifies the base of the number in numString. If this argument is not supplied, strings with a prefix of '0x' are considered hexadecimal. All other strings are considered decimal.

    Returns number

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc