From eb5dee514ba02f866d1eb3378df9ccc5830e7747 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Mon, 11 Aug 2025 19:35:30 +0200 Subject: Added helpers to stdlib --- stdlib/helpers.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 stdlib/helpers.lua (limited to 'stdlib/helpers.lua') diff --git a/stdlib/helpers.lua b/stdlib/helpers.lua new file mode 100644 index 0000000..bcf1418 --- /dev/null +++ b/stdlib/helpers.lua @@ -0,0 +1,11 @@ +function print_table(t, indent) + indent = indent or "" + for key, value in pairs(t) do + if type(value) == "table" then + print(indent .. key .. ":") + print_table(value, indent .. " ") + else + print(indent .. key .. ": " .. tostring(value)) + end + end +end -- cgit v1.2.3