FANDOM


--<nowiki>
local Icon = {}
local getArgs = require('Dev:Arguments').getArgs
local data = mw.loadData("Module:Icon/data")
 
function Icon.main(frame) -- Implements {{icon|1=icon}}
	local args = getArgs(frame)
 
    local icon = ''
    if (args['icon'] or args[1]) then 
        icon = (args['icon'] or args[1])
        icon = string.lower(icon)
        local result = data[icon]:gsub("|", "|alt=")
        return string.format('['..'['..'File:'..result..'|link=]]')
    end
end
 
return Icon