summaryrefslogtreecommitdiff
path: root/stdlib
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2025-08-11 19:35:30 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2025-08-11 19:35:30 +0200
commiteb5dee514ba02f866d1eb3378df9ccc5830e7747 (patch)
tree6214c74e00d221dc758f2764dfdcd5b2ac8b590b /stdlib
parent74e8b2f3b70545a0afd81be6bd4a391dbf5529ae (diff)
downloadbidi-eb5dee514ba02f866d1eb3378df9ccc5830e7747.tar.gz
Added helpers to stdlib
Diffstat (limited to 'stdlib')
-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