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

Type parameters

  • T: object

Hierarchy

  • Predicate<WeakSet<T>>
    • WeakSetPredicate

Implements

  • BasePredicate<WeakSet<T>>

Index

Accessors

Methods

Accessors

not

not:

Invert the following validators.

Methods

has

  • has(...items: T[]): this
  • Test a WeakSet to include all the provided items. The items are tested by identity, not structure.

    Parameters

    • Rest ...items: T[]

      The items that should be a item in the WeakSet.

    Returns this

hasAny

  • hasAny(...items: T[]): this
  • Test a WeakSet to include any of the provided items. The items are tested by identity, not structure.

    Parameters

    • Rest ...items: T[]

      The items that could be a item in the WeakSet.

    Returns this

is

  • is(fn: function): this
  • Test if the value matches a custom validation function. The validation function should return true if the value passes the function. If the function either returns false or a string, the function fails and the string will be used as error message.

    Parameters

    • fn: function

      Validation function.

        • (value: WeakSet<T>): boolean | string
        • Parameters

          • value: WeakSet<T>

          Returns boolean | string

    Returns this