summaryrefslogtreecommitdiff
path: root/stdlib/helpers.lua
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/helpers.lua')
-rw-r--r--stdlib/helpers.lua11
1 files changed, 11 insertions, 0 deletions
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