Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PredicateStatic

The Predicates class offers some helper functions to deal with Predicate including the ability to build Predicate from functions using PredicateStatic.of, some builtin predicates like PredicateStatic.isIn, and the ability to combine to combine Predicates like with PredicateStatic.allOf.

Hierarchy

  • PredicateStatic

Index

Methods

allOf

  • allOf<T>(...predicates: Array<function>): Predicate<T>
  • Return a Predicate checking whether all of the predicate functions given hold

    Type parameters

    • T

    Parameters

    • Rest ...predicates: Array<function>

    Returns Predicate<T>

anyOf

  • anyOf<T>(...predicates: Array<function>): Predicate<T>
  • Return a Predicate checking whether any of the predicate functions given hold

    Type parameters

    • T

    Parameters

    • Rest ...predicates: Array<function>

    Returns Predicate<T>

equals

isIn

noneOf

  • noneOf<T>(...predicates: Array<function>): Predicate<T>
  • Return a Predicate checking whether none of the predicate functions given hold

    Type parameters

    • T

    Parameters

    • Rest ...predicates: Array<function>

    Returns Predicate<T>

of

  • Take a predicate function and of it to become a Predicate (enabling you to call Predicate.and, and other logic operations on it)

    Type parameters

    • T

    Parameters

    • fn: function
        • (x: T): boolean
        • Parameters

          • x: T

          Returns boolean

    Returns Predicate<T>

Generated using TypeDoc