Function isNonZeroNegativeInteger

  • Checks if a given number is a negative non-zero integer.

    Parameters

    • int: number

      The number to check.

    Returns boolean

    A boolean indicating whether the input is a negative integer.

    Remarks

    This function uses the Number.isInteger method to check if the input is an integer, and then checks if it is less than 0.

    Example

    isNonZeroNegativeInteger(-5); ;
    //=> true
    isNonZeroNegativeInteger(0); ;
    //=> false
    isNonZeroNegativeInteger(5); ;
    //=> false

Generated using TypeDoc