ow
Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Predicate<number>
    • NumberPredicate

Index

Constructors

constructor

Accessors

finite

finite:

Test a number to be finite.

infinite

infinite:

Test a number to be infinite.

integer

integer:

Test a number to be an integer.

negative

negative:

Test a number to be negative.

not

not:

Invert the following validators.

positive

positive:

Test a number to be positive.

Methods

equal

  • equal(expected: number): this
  • Test a number to be equal to a specified number.

    Parameters

    • expected: number

      Expected value to match.

    Returns this

greaterThan

  • greaterThan(x: number): this
  • Test a number to be greater than the provided value.

    Parameters

    • x: number

      Minimum value.

    Returns this

greaterThanOrEqual

  • greaterThanOrEqual(x: number): this
  • Test a number to be greater than or equal to the provided value.

    Parameters

    • x: number

      Minimum value.

    Returns this

inRange

  • inRange(start: number, end: number): this
  • Test a number to be in a specified range.

    Parameters

    • start: number

      Start of the range.

    • end: number

      End of the range.

    Returns this

lessThan

  • lessThan(x: number): this
  • Test a number to be less than the provided value.

    Parameters

    • x: number

      Maximum value.

    Returns this

lessThanOrEqual

  • lessThanOrEqual(x: number): this
  • Test a number to be less than or equal to the provided value.

    Parameters

    • x: number

      Minimum value.

    Returns this