MCPcopy
hub / github.com/chen-zeong/DTV / safeString

Function safeString

web/src/services/search.ts:16–18  ·  view source on GitHub ↗
(v: unknown)

Source from the content-addressed store, hash-verified

14};
15
16function safeString(v: unknown) {
17 return typeof v === "string" ? v : v == null ? "" : String(v);
18}
19
20function toBool(v: unknown) {
21 if (typeof v === "boolean") return v;

Callers 2

parseDouyuSearchFunction · 0.85
searchAnchorsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected