diff options
| author | Elizabeth Hunt <elizabeth@simponic.xyz> | 2026-04-22 20:29:50 -0700 |
|---|---|---|
| committer | Elizabeth Hunt <elizabeth@simponic.xyz> | 2026-04-22 20:29:50 -0700 |
| commit | 24b0469237285a05d9ffc05d18e43cc5dcdef00f (patch) | |
| tree | 1c6924614b7d030c467919380d6c398d62efb602 /util.lua | |
| parent | 078eca583eec21d317e931c84db8f084bef4305d (diff) | |
| download | dyl8-24b0469237285a05d9ffc05d18e43cc5dcdef00f.tar.gz dyl8-24b0469237285a05d9ffc05d18e43cc5dcdef00f.zip | |
Stuff
Diffstat (limited to 'util.lua')
| -rw-r--r-- | util.lua | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -49,4 +49,13 @@ function filter(a, pred) end end return filtered -end
\ No newline at end of file +end + +function fmt(x) + t = type(x) + if t == "number" then return "" .. x + elseif t == "string" then return x + elseif t == "boolean" and x then return "true" + elseif t == "boolean" and not x then return "false" end + return "NA" +end |
