This commit is contained in:
Kim Ravn Hansen
2025-11-04 15:35:32 +01:00
parent 5cf39a3a9f
commit 7c09d28416
3 changed files with 18 additions and 11 deletions

View File

@@ -14,8 +14,10 @@ end
-- }}}
--{{{ print_r
--- @diagnostic disable-next-line unused-function
local function print_r(t)
local print_r_cache = {}
--- @diagnostic disable-next-line unused-function
local function sub_print_r(t, indent)
if (print_r_cache[tostring(t)]) then
print(indent .. "*" .. tostring(t))
@@ -67,7 +69,8 @@ end
--}}}
--{{{ table_count
function table_count(t)
--- @diagnostic disable-next-line unused-function
local function table_count(t)
local count = 0
for _ in pairs(t) do count = count + 1 end
return count