forEach()

areRegExp().forEach()

The forEach() method executes a provided callback function once for each element of the supplied values of areRegExp().

The method uses forEach() method of areDeterminer().

Example usage

// Example usage.
import { areRegExp } from '@angular-package/type';

areRegExp(/^[]/, /^[]/, /^[]/, 3).forEach(
  (result, value, index, payload, array) => {
    result // true, true, true, false
    value // /^[]/, /^[]/, /^[]/, 4
    index // 0, 1, 2, 3
    array // [ /^[]/, /^[]/, /^[]/, 3 ]
    payload // { age: 2 }
    if (result === true) {
      // Do something.
    }
    return result;
  },
  { age: 2 }
);

Last updated