MCPcopy
hub / github.com/stemdeckapp/stemdeck / normalizeFolderColor

Function normalizeFolderColor

static/js/catalog.js:99–101  ·  view source on GitHub ↗
(color)

Source from the content-addressed store, hash-verified

97}
98
99function normalizeFolderColor(color) {
100 return FOLDER_COLORS.includes(color) ? color : DEFAULT_FOLDER_COLOR;
101}
102
103function makeFolder({ id = `f-${Date.now()}`, name = "New folder", collapsed = false, items = [], parentId = null } = {}) {
104 return { id, name, collapsed, items, color: DEFAULT_FOLDER_COLOR, parentId: parentId ?? null };

Callers 4

loadStateFunction · 0.85
openFolderEditorFunction · 0.85
renderFolderFunction · 0.85
renderStripFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected