mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-11-15 21:13:00 +08:00
🦄 Sync 2026-04-02 23:48:06
This commit is contained in:
1 parent
a794220143
commit
c361065f64
35 files changed
+958
-537
No files matched your search
@@ -1551,3 +1551,13 @@ function get_core(field, candidates)
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
function cleanEmptyTables(t)
|
||||
if type(t) ~= "table" then return nil end
|
||||
for k, v in pairs(t) do
|
||||
if type(v) == "table" then
|
||||
t[k] = cleanEmptyTables(v)
|
||||
end
|
||||
end
|
||||
return next(t) and t or nil
|
||||
end
|
||||
Reference in new issue
Block a user