(value: unknown)
| 46 | * Returns the Date if valid, undefined otherwise. |
| 47 | */ |
| 48 | export function parseTagDate(value: unknown): Date | undefined { |
| 49 | if (typeof value !== 'string') return undefined |
| 50 | const date = new Date(value) |
| 51 | return Number.isNaN(date.getTime()) ? undefined : date |
| 52 | } |
| 53 | |
| 54 | /** |
| 55 | * Joins an array metadata value into a comma-separated string for tag mapping. |
no outgoing calls
no test coverage detected