Software /
code /
prosody
File
util/mathcompat.lua @ 13320:23f95714c386
net.http: Set Connection header based on connection pool usage
Connection: keep-alive is implicit in HTTP/1.1 but explicit > implicit
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 11 Nov 2023 23:48:45 +0100 (18 months ago) |
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