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

Hierarchy

  • Ow

Callable

  • __call<T>(value: T, predicate: Predicate<T>): void
  • Test if the value matches the predicate.

    Type parameters

    • T

    Parameters

    • value: T

      Value to test.

    • predicate: Predicate<T>

      Predicate to test against.

    Returns void

Index

Properties

array

Test the value to be an array.

arrayBuffer

arrayBuffer: Predicate<ArrayBuffer>

Test the value to be a ArrayBuffer.

boolean

Test the value to be a boolean.

buffer

buffer: Predicate<Buffer>

Test the value to be a Buffer.

dataView

dataView: Predicate<DataView>

Test the value to be a DataView.

date

Test the value to be a Date.

error

Test the value to be an Error.

float32Array

float32Array: Predicate<Float32Array>

Test the value to be a Float32Array.

float64Array

float64Array: Predicate<Float64Array>

Test the value to be a Float64Array.

function

function: Predicate<Function>

Test the value to be a Function.

int16Array

int16Array: Predicate<Int16Array>

Test the value to be a Int16Array.

int32Array

int32Array: Predicate<Int32Array>

Test the value to be a Int32Array.

int8Array

int8Array: Predicate<Int8Array>

Test the value to be a Int8Array.

iterable

iterable: Predicate<Iterable<any>>

Test the value to be Iterable.

map

Test the value to be a Map.

nan

nan: Predicate<number>

Test the value to be not a number.

null

null: Predicate<null>

Test the value to be null.

nullOrUndefined

nullOrUndefined: Predicate<null | undefined>

Test the value to be null or undefined.

number

Test the value to be a number.

object

Test the value to be an object.

promise

promise: Predicate<Promise<any>>

Test the value to be a Promise.

regExp

regExp: Predicate<RegExp>

Test the value to be a RegExp.

set

Test the value to be a Set.

string

Test the value to be a string.

symbol

symbol: Predicate<Symbol>

Test the value to be a Symbol.

typedArray

typedArray: Predicate<TypedArray>

Test the value to be a typed array.

uint16Array

uint16Array: Predicate<Uint16Array>

Test the value to be a Uint16Array.

uint32Array

uint32Array: Predicate<Uint32Array>

Test the value to be a Uint32Array.

uint8Array

uint8Array: Predicate<Uint8Array>

Test the value to be a Uint8Array.

uint8ClampedArray

uint8ClampedArray: Predicate<Uint8ClampedArray>

Test the value to be a Uint8ClampedArray.

undefined

undefined: Predicate<undefined>

Test the value to be undefined.

weakMap

Test the value to be a WeakMap.

weakSet

Test the value to be a WeakSet.

Methods

any

  • any<T1>(p1: Predicate<T1>): Predicate<T1>
  • any<T1, T2>(p1: Predicate<T1>, p2: Predicate<T2>): Predicate<T1 | T2>
  • any<T1, T2, T3>(p1: Predicate<T1>, p2: Predicate<T2>, p3: Predicate<T3>): Predicate<T1 | T2 | T3>
  • any<T1, T2, T3, T4>(p1: Predicate<T1>, p2: Predicate<T2>, p3: Predicate<T3>, p4: Predicate<T4>): Predicate<T1 | T2 | T3 | T4>
  • any<T1, T2, T3, T4, T5>(p1: Predicate<T1>, p2: Predicate<T2>, p3: Predicate<T3>, p4: Predicate<T4>, p5: Predicate<T5>): Predicate<T1 | T2 | T3 | T4 | T5>
  • any<T1, T2, T3, T4, T5, T6>(p1: Predicate<T1>, p2: Predicate<T2>, p3: Predicate<T3>, p4: Predicate<T4>, p5: Predicate<T5>, p6: Predicate<T6>): Predicate<T1 | T2 | T3 | T4 | T5 | T6>
  • any<T1, T2, T3, T4, T5, T6, T7>(p1: Predicate<T1>, p2: Predicate<T2>, p3: Predicate<T3>, p4: Predicate<T4>, p5: Predicate<T5>, p6: Predicate<T6>, p7: Predicate<T7>): Predicate<T1 | T2 | T3 | T4 | T5 | T6 | T7>
  • any<T1, T2, T3, T4, T5, T6, T7, T8>(p1: Predicate<T1>, p2: Predicate<T2>, p3: Predicate<T3>, p4: Predicate<T4>, p5: Predicate<T5>, p6: Predicate<T6>, p7: Predicate<T7>, p8: Predicate<T8>): Predicate<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8>
  • any<T1, T2, T3, T4, T5, T6, T7, T8, T9>(p1: Predicate<T1>, p2: Predicate<T2>, p3: Predicate<T3>, p4: Predicate<T4>, p5: Predicate<T5>, p6: Predicate<T6>, p7: Predicate<T7>, p8: Predicate<T8>, p9: Predicate<T9>): Predicate<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9>
  • any<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(p1: Predicate<T1>, p2: Predicate<T2>, p3: Predicate<T3>, p4: Predicate<T4>, p5: Predicate<T5>, p6: Predicate<T6>, p7: Predicate<T7>, p8: Predicate<T8>, p9: Predicate<T9>, p10: Predicate<T10>): Predicate<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9 | T10>
  • any(...predicate: Predicate[]): Predicate
  • Test that the value matches at least one of the given predicates.

    Type parameters

    • T1

    Parameters

    • p1: Predicate<T1>

    Returns Predicate<T1>

  • Type parameters

    • T1

    • T2

    Parameters

    • p1: Predicate<T1>
    • p2: Predicate<T2>

    Returns Predicate<T1 | T2>

  • Type parameters

    • T1

    • T2

    • T3

    Parameters

    • p1: Predicate<T1>
    • p2: Predicate<T2>
    • p3: Predicate<T3>

    Returns Predicate<T1 | T2 | T3>

  • Type parameters

    • T1

    • T2

    • T3

    • T4

    Parameters

    • p1: Predicate<T1>
    • p2: Predicate<T2>
    • p3: Predicate<T3>
    • p4: Predicate<T4>

    Returns Predicate<T1 | T2 | T3 | T4>

  • Type parameters

    • T1

    • T2

    • T3

    • T4

    • T5

    Parameters

    • p1: Predicate<T1>
    • p2: Predicate<T2>
    • p3: Predicate<T3>
    • p4: Predicate<T4>
    • p5: Predicate<T5>

    Returns Predicate<T1 | T2 | T3 | T4 | T5>

  • Type parameters

    • T1

    • T2

    • T3

    • T4

    • T5

    • T6

    Parameters

    • p1: Predicate<T1>
    • p2: Predicate<T2>
    • p3: Predicate<T3>
    • p4: Predicate<T4>
    • p5: Predicate<T5>
    • p6: Predicate<T6>

    Returns Predicate<T1 | T2 | T3 | T4 | T5 | T6>

  • Type parameters

    • T1

    • T2

    • T3

    • T4

    • T5

    • T6

    • T7

    Parameters

    • p1: Predicate<T1>
    • p2: Predicate<T2>
    • p3: Predicate<T3>
    • p4: Predicate<T4>
    • p5: Predicate<T5>
    • p6: Predicate<T6>
    • p7: Predicate<T7>

    Returns Predicate<T1 | T2 | T3 | T4 | T5 | T6 | T7>

  • Type parameters

    • T1

    • T2

    • T3

    • T4

    • T5

    • T6

    • T7

    • T8

    Parameters

    • p1: Predicate<T1>
    • p2: Predicate<T2>
    • p3: Predicate<T3>
    • p4: Predicate<T4>
    • p5: Predicate<T5>
    • p6: Predicate<T6>
    • p7: Predicate<T7>
    • p8: Predicate<T8>

    Returns Predicate<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8>

  • Type parameters

    • T1

    • T2

    • T3

    • T4

    • T5

    • T6

    • T7

    • T8

    • T9

    Parameters

    • p1: Predicate<T1>
    • p2: Predicate<T2>
    • p3: Predicate<T3>
    • p4: Predicate<T4>
    • p5: Predicate<T5>
    • p6: Predicate<T6>
    • p7: Predicate<T7>
    • p8: Predicate<T8>
    • p9: Predicate<T9>

    Returns Predicate<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9>

  • Type parameters

    • T1

    • T2

    • T3

    • T4

    • T5

    • T6

    • T7

    • T8

    • T9

    • T10

    Parameters

    • p1: Predicate<T1>
    • p2: Predicate<T2>
    • p3: Predicate<T3>
    • p4: Predicate<T4>
    • p5: Predicate<T5>
    • p6: Predicate<T6>
    • p7: Predicate<T7>
    • p8: Predicate<T8>
    • p9: Predicate<T9>
    • p10: Predicate<T10>

    Returns Predicate<T1 | T2 | T3 | T4 | T5 | T6 | T7 | T8 | T9 | T10>

  • Parameters

    • Rest ...predicate: Predicate[]

    Returns Predicate

create

  • create<T>(predicate: Predicate<T>): function
  • Create a reusable validator.

    Type parameters

    • T

    Parameters

    • predicate: Predicate<T>

      Predicate used in the validator function.

    Returns function

      • (value: T): void
      • Parameters

        • value: T

        Returns void