progress
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
--
|
||||
--{{{ print_r(t)
|
||||
--- @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))
|
||||
@@ -53,7 +55,8 @@ end
|
||||
--}}}
|
||||
|
||||
--{{{ table_count(t)
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user