Validation API

isDate()

Validates that the passed arguments are instanceof Date.

  • Accepts any arguments.
  • Returns true if all provided arguments pass the validation, otherwise, returns false.
Example:
isDate(new Date());
isDate(new Date(), new Date());
// true

isDate(null);
isDate('1990-01-01');
isDate({toISOString: () => '1990-01-01T00:00:00.000Z'});
isDate(new Date(), null);
// false