adds .local/share/millennium and easyeffects

This commit is contained in:
2026-08-06 18:11:50 +02:00
parent f3f3bfb83e
commit 26031a629a
2581 changed files with 339035 additions and 0 deletions
@@ -0,0 +1,24 @@
-- Utility helpers for extension installation
local M = {}
-- Helper to create empty arrays that serialize as [] not {}
-- cjson treats tables with no elements ambiguously, this ensures array serialization
function M.empty_array()
local arr = {}
setmetatable(arr, { __jsontype = "array" })
return arr
end
-- Ensure nested table path exists, creating tables as needed
-- Usage: ensure_nested(t, "a", "b", "c") ensures t.a.b.c exists
function M.ensure_nested(t, ...)
local current = t
for _, key in ipairs({...}) do
if not current[key] then current[key] = {} end
current = current[key]
end
return current
end
return M