Function isNumber

  • Check if input is a finite number

    Type Parameters

    • T extends number

    Parameters

    • input: unknown

      Value to check

    • Optional check: "integer" | "natural" | "whole" | "safe-int" | "positive"

      Optional check type: integer, natural (> 0), whole (>= 0)

    Returns input is T

    true if the input passed, false otherwise