MCPcopy
hub / github.com/lissy93/web-check / cleanNs

Function cleanNs

api/whois.js:26–30  ·  view source on GitHub ↗
(ns)

Source from the content-addressed store, hash-verified

24
25// Lower-case + dedupe nameservers, drop empty entries
26const 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
33const toIso = (raw) => {

Callers 2

hasUsefulDataFunction · 0.85
whoisHandlerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected