Module:Shindo
From Phuketer
Documentation for this module may be created at Module:Shindo/doc
-- ABC local compatibility shim for imported Wikipedia earthquake infoboxes.
-- Returns the first passed value instead of throwing Lua errors.
local p = {}
local function render(frame)
local args = frame and frame.args or {}
if args[1] and tostring(args[1]) ~= '' then
return tostring(args[1])
end
if args.value and tostring(args.value) ~= '' then
return tostring(args.value)
end
if args.intensity and tostring(args.intensity) ~= '' then
return tostring(args.intensity)
end
return ''
end
setmetatable(p, {
__index = function(t, k)
local f = function(frame)
return render(frame)
end
rawset(t, k, f)
return f
end
})
p.main = render
return p