Mercurial > prosody-hg
view util/mathcompat.lua @ 13977:3326c8a29a86
util.prosodyctl.shell: Send result line to stderr to help TSV parsing
When output is piped somewhere and tables are formatted as TSV, it
complicates parsing to have a non-TSV line at the end.
| author | Kim Alvefur <zash@zash.se> |
|---|---|
| date | Mon, 06 Oct 2025 00:30:14 +0200 |
| parents | 8815d3090928 |
| children |
line wrap: on
line source
if not math.type then local function math_type(t) if type(t) == "number" then if t % 1 == 0 and t ~= t + 1 and t ~= t - 1 then return "integer" else return "float" end end end _G.math.type = math_type end
