MCPcopy
hub / github.com/Dimillian/CodexMonitor / normalizeStringList

Function normalizeStringList

src/features/threads/utils/threadNormalize.ts:141–147  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

139}
140
141export function normalizeStringList(value: unknown) {
142 if (Array.isArray(value)) {
143 return value.map((entry) => asString(entry)).filter(Boolean);
144 }
145 const single = asString(value);
146 return single ? [single] : [];
147}
148
149export function normalizeRootPath(value: string) {
150 const normalized = value.replace(/\\/g, "/").replace(/\/+$/, "");

Callers 1

useThreadLinkingFunction · 0.90

Calls 1

asStringFunction · 0.70

Tested by

no test coverage detected