local _, shared = ... ---@cast shared HeimdallShared if not shared.dump then ---@param value any ---@param msg string? ---@param depth number? shared.dump = function(value, msg, depth) if not value then print(tostring(value)) return end if type(value) ~= "table" then print(tostring(value)) return end if msg then print(msg) end if depth == nil then depth = 0 end if depth > 200 then print("Error: Depth > 200 in dump()") return end for k, v in pairs(value) do if type(v) == "table" then print(string.rep(" ", depth) .. tostring(k) .. ":") shared.dump(v, msg, depth + 1) else print(string.rep(" ", depth) .. tostring(k) .. ": " .. tostring(v)) end end end end