Checks if provided value is actually a number.

  • Parameters

    • num: unknown

      value to check

    Returns boolean

    isNumber("2"); // true
    isNumber("1.11"); // true
    isNumber("0xff"); // true

    isNumber("two"); // false
    isNumber({ two: 2 }); // false
    isNumber(Number.POSITIVE_INFINITY); // false