every()

areDate().every()

Checks whether every provided value of areDate() is a Date.

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

Returns

The return value is a boolean indicating whether the provided values of areDate() are Date.

Example usage

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

areDate(new Date(), new Date('invalid date')).every((result, value, payload) => {
  result // false
  value // [Sat Sep 11 2021 21:36:43 GMT+0200 (Central European Summer Time), Invalid Date]
  payload // undefined
  return result;
}); // false, boolean

Last updated