Software /
code /
prosody
File
util/mathcompat.lua @ 13612:8617f5962e47
prosodyctl: Hide the 'lua_paths' command from default command listing
All commands are called with a '-h' argument, but this one doesn't have
that. Since it's meant to be machine readable, hiding it seems
marginally more sensible than implementing '-h'.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 08 Jan 2025 22:46:21 +0100 |
parent | 12782:8815d3090928 |
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