Module:Quantity box

From RuneScape Classic Wiki
Jump to: navigation, search

Documentation for this module may be created at Module:Quantity box/doc

local p = {}
local commas = require('Module:Addcommas')._add

function p._main(arg)
	if not tonumber(arg) then
		return arg
	end
	return string.format('<span class="infobox-quantity" data-val-each="%s"><span class="infobox-quantity-replace">%s</span> xp</span>', arg, commas(arg))
end

function p.main(frame)
    local args = frame:getParent().args
    return p._main(args[1])
end

return p