areRegExp()

areRegExp()

Checks whether the values are regular expressions of RegExparrow-up-right by using every(), forEach() and some() methods of the returned object.

are-regexp.func.ts
const areRegExp = <CommonPayload extends object>(...values: any[]) =>
  areDeterminer<CommonPayload>(isRegExp, ...values);

Generic type variables

CommonPayloadextendsobject

The CommonPayload generic type variable constrained by the objectarrow-up-right constrains the generic type variable Payload of each returned method.

Parameters

...values: any[]

A rest parameter of anyarrow-up-right type to check its elements against the regular expression of RegExparrow-up-right.

Returns

The return value is an objectarrow-up-right with every(), some() and forEach() as methods of checking supplied values.

Last updated