UNPKG
@chassisjs/hermes
Version:
latest (1.0.0-alpha.16)
1.0.0-alpha.16
1.0.0-alpha.15
1.0.0-alpha.14
1.0.0-alpha.13
1.0.0-alpha.12
Production-Ready TypeScript Outbox Pattern
docs.hermesjs.tech
chassisjs/hermes
@chassisjs/hermes
/
lib
/
core
/
typing
/
assert.js
7 lines
•
291 B
JavaScript
View Raw
1
2
3
4
5
6
7
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