Function isInteger

  • Checks if the provided number is an integer.

    Parameters

    • number: unknown

    Returns boolean

    A boolean indicating whether the provided number is an integer.

    Remarks

    This function uses the built-in Number.isInteger method.

    Example

    isInteger(5);
    //=> true
    isInteger(5.5);
    //=> false

Generated using TypeDoc