Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "IsPositive"

Index

Functions

isPositive

  • isPositive(value: number): boolean
  • Checks if the value is > 0.

    Parameters

    • value: number

      The value being checked.

    Returns boolean

    True if the value is a number and is positive, false otherwise.

isPositiveError

  • isPositiveError(value: any, field: string, code?: string): void
  • Throws an IsError if the value is not positive.

    throws

    IsError if the value is not a number instance.

    Parameters

    • value: any

      The value being checked.

    • field: string

      The name of the field being checked.

    • Optional code: string

      The application / module code assigned to this error.

    Returns void

Generated using TypeDoc