diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2025-08-11 19:35:30 +0200 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2025-08-11 19:35:30 +0200 |
| commit | eb5dee514ba02f866d1eb3378df9ccc5830e7747 (patch) | |
| tree | 6214c74e00d221dc758f2764dfdcd5b2ac8b590b /stdlib | |
| parent | 74e8b2f3b70545a0afd81be6bd4a391dbf5529ae (diff) | |
| download | bidi-eb5dee514ba02f866d1eb3378df9ccc5830e7747.tar.gz | |
Added helpers to stdlib
Diffstat (limited to 'stdlib')
| -rw-r--r-- | stdlib/helpers.lua | 11 |
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 |
