Module:Constants

local Constants = mw.loadData("Module:Constants/Data")

local p = {}

function p.Main(frame) local id = frame.args[1] if id == nil or id == "" then error("No constant name provided") end local constant = Constants[id] if constant == nil then error(string.format("Constant '%s' does not exist", id)) end return constant end

return p