MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / normalizeLanguages

Function normalizeLanguages

src/settings/lspConfigUtils.js:14–29  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

12}
13
14export function normalizeLanguages(value) {
15 if (Array.isArray(value)) {
16 return value
17 .map((lang) =>
18 String(lang || "")
19 .trim()
20 .toLowerCase(),
21 )
22 .filter(Boolean);
23 }
24
25 return String(value || "")
26 .split(",")
27 .map((lang) => lang.trim().toLowerCase())
28 .filter(Boolean);
29}
30
31export function getServerOverride(id) {
32 return appSettings.value?.lsp?.servers?.[normalizeServerId(id)] || {};

Callers 2

callbackFunction · 0.90
upsertCustomServerFunction · 0.85

Calls 1

StringInterface · 0.85

Tested by

no test coverage detected