(ns)
| 24 | |
| 25 | // Lower-case + dedupe nameservers, drop empty entries |
| 26 | const cleanNs = (ns) => { |
| 27 | if (!Array.isArray(ns)) return undefined; |
| 28 | const out = [...new Set(ns.map((n) => String(n).trim().toLowerCase()).filter(Boolean))]; |
| 29 | return out.length ? out : undefined; |
| 30 | }; |
| 31 | |
| 32 | // Convert a date string to ISO 8601 when parseable, otherwise return the raw value |
| 33 | const toIso = (raw) => { |
no outgoing calls
no test coverage detected