Fandom Developers Wiki
Documentation icon Module documentation

The documentation for this module is missing. Click here to create it.

-- <nowiki>
-- Shows currency information based on ISO 4217
local p = {}
local data = mw.loadData("Dev:Currency/data")
local getArgs = require("Dev:Arguments").getArgs

local function getCurrencyInfo(currencyCode, currencyInfo)
    local currency = data[currencyCode:upper()]

    if currency and currency[currencyInfo] then
        return currency[currencyInfo]
    end
end

function p.main(frame)
	local args = getArgs(frame)
    return getCurrencyInfo(frame.args[1], frame.args[2])
end

return p