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

Function asStringArray

step/step19.js:54–58  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

52}
53
54function asStringArray(value) {
55 if (Array.isArray(value)) return value.filter((v) => typeof v === "string" && v.trim());
56 if (typeof value === "string") return value.split(",").map((v) => v.trim()).filter(Boolean);
57 return [];
58}
59
60function asPositiveInt(value) {
61 const n = typeof value === "number" ? value : Number.parseInt(String(value), 10);

Callers 1

loadFromOneDirFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected