From 24b0469237285a05d9ffc05d18e43cc5dcdef00f Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Wed, 22 Apr 2026 20:29:50 -0700 Subject: Stuff --- util.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'util.lua') diff --git a/util.lua b/util.lua index bb9b2e8..157d7ad 100644 --- a/util.lua +++ b/util.lua @@ -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 -- cgit v1.3