tguard-js
    Preparing search index...
    • Determines whether the provided value is a number (not a type of bigint).

      Use isBigInt to check if a value is a bigint.

      Value Real Value Result
      0 0 true
      1.0 1 true
      0xFFF 4095 true
      0b100 4 true
      1e5 100000 true
      NaN NaN true
      Infinity Infinity true
      BigInt(1) 1n false
      BigInt(0xE) 14n false
      1n 1n false

      Parameters

      • x: unknown

        The value to be checked.

      Returns x is number

      true if the value is a number, otherwise false.

      1.0