MCPcopy Create free account
hub / github.com/Piebald-AI/claude-code-lsps / normalizeStringArray

Function normalizeStringArray

scripts/lsp-definition-utils.mjs:99–114  ·  view source on GitHub ↗
(value, context, errors)

Source from the content-addressed store, hash-verified

97}
98
99function normalizeStringArray(value, context, errors) {
100 if (!Array.isArray(value)) {
101 errors.push(`${context} must be an array`);
102 return null;
103 }
104
105 const normalized = [];
106 for (const item of value) {
107 if (typeof item !== "string") {
108 errors.push(`${context} items must be strings`);
109 continue;
110 }
111 normalized.push(item);
112 }
113 return normalized;
114}
115
116function normalizeEnv(value, context, errors) {
117 if (!isPlainObject(value)) {

Callers 1

normalizeServerConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected