(value)
| 3 | const NULL_VALUES = new Set(['unknown', 'n/a', 'none', 'null', 'n/a.']) |
| 4 | |
| 5 | function normalizeString(value) { |
| 6 | if (value === undefined || value === null) return null |
| 7 | const s = String(value).trim() |
| 8 | if (!s) return null |
| 9 | if (NULL_VALUES.has(s.toLowerCase())) return null |
| 10 | return s |
| 11 | } |
| 12 | |
| 13 | /** |
| 14 | * Format a parsed Date as YYYY-MM-DD without shifting the calendar day. |
no outgoing calls
no test coverage detected