Module:Format equipment stat

This is the current revision of this page, as edited by Alex (talk | contribs) at 00:12, 17 October 2024 (Created page with "local p = {} function p.main(frame) return p.format(frame:getParent().args[1]) end function p.format(_arg, default) local arg = tonumber(_arg) if not arg then return default or _arg end if arg < 0 then return tostring(arg) end return '+'..arg end return p"). The present address (URL) is a permanent link to this version.

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Module documentation
This documentation is transcluded from Template:No documentation/doc. [edit] [history] [purge]
This module does not have any documentation. Please consider adding documentation at Module:Format equipment stat/doc. [edit]
local p = {}

function p.main(frame)
	return p.format(frame:getParent().args[1])
end

function p.format(_arg, default)
	local arg = tonumber(_arg)
	if not arg then return default or _arg end
	if arg < 0 then return tostring(arg) end
	return '+'..arg
end

return p