MCPcopy Create free account
hub / github.com/ConardLi/easy-agent / asStringArray

Function asStringArray

step/step23.js:60–64  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

58}
59
60function asStringArray(value) {
61 if (Array.isArray(value)) return value.filter((v) => typeof v === "string" && v.trim());
62 if (typeof value === "string") return value.split(",").map((v) => v.trim()).filter(Boolean);
63 return [];
64}
65
66function fallbackDescription(body, fallback) {
67 const line = body.split(/\r?\n/).map((l) => l.trim()).find((l) => l && !l.startsWith("#"));

Callers 1

loadCommandsFromOneDirFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected