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

Function normalizePluginKeywords

src/pages/plugins/plugins.js:581–597  ·  view source on GitHub ↗
(plugin)

Source from the content-addressed store, hash-verified

579 }
580
581 function normalizePluginKeywords(plugin) {
582 const { keywords } = plugin || {};
583 if (!keywords) return [];
584 if (Array.isArray(keywords)) return keywords;
585 if (typeof keywords === "string") {
586 try {
587 const parsed = JSON.parse(keywords);
588 if (Array.isArray(parsed)) return parsed;
589 } catch (error) {
590 return keywords
591 .split(",")
592 .map((item) => item.trim())
593 .filter(Boolean);
594 }
595 }
596 return [];
597 }
598
599 async function getAllPlugins() {
600 if (currentFilter) return;

Callers 1

matchesFilterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected