Function
coerceDateOption
(value: string | Date | null | undefined)
Source from the content-addressed store, hash-verified
| 3378 | } |
| 3379 | |
| 3380 | function coerceDateOption(value: string | Date | null | undefined): Date | null { |
| 3381 | if (!value) return null; |
| 3382 | return value instanceof Date ? value : new Date(value); |
| 3383 | } |
| 3384 | |
| 3385 | function isRecord(value: unknown): value is Record<string, unknown> { |
| 3386 | return typeof value === "object" && value !== null && !Array.isArray(value); |
Tested by
no test coverage detected