UNPKG

@chassisjs/hermes

Version:

Production-Ready TypeScript Outbox Pattern

7 lines 291 B
import { AssertionError } from '../errors.js'; export function assertDate(value) { if (!(value instanceof Date) || isNaN(new Date(value).getTime())) { throw new AssertionError({ forValue: value, forKey: 'date' }, `Value is not a date`); } } //# sourceMappingURL=assert.js.map