Module:Nullish
可在Module:Nullish/doc创建此模块的帮助文档
local null, nullish
nullish = function(v) return v == null or v == nil end
null = setmetatable({}, {
__newindex = function() return end,
__concat = function(a, b)
return b == "" and tostring(a) or (a .. "") .. (b .. "")
end,
__tostring = function() return "null" end,
__call = function() return nil end,
__div = function(a, b)
if nullish(a) then return b end
return a
end
})
return null, nullish