Module:Format eq stat

From OtherX
Jump to navigation Jump to search
Module documentation
This documentation is transcluded from Template:No documentation/doc. [edit] [history] [purge]

This {{#switch:Module

|=article |User=user page |RuneScape=project page |File=image |Template=template |Help=help page |Category=category |Map=map page |Forum=forum thread |Exchange=exchange page |Update=update page |Calculator=calculator |Transcript=transcript |Property=property |Module=module |Guide=guide

|Talk=talk page |User talk=talk page |RuneScape talk=talk page |File talk=talk page |Template talk=talk page |Help talk=talk page |Category talk=talk page |Map talk=map talk page |Forum talk=talk page |Exchange talk=talk page |Update talk=talk page |Calculator talk=talk page |Transcript talk=talk page |Property talk=talk page |Module talk=talk page |Guide talk=talk page

|#default=<page type>

}} does not have any documentation. Please consider adding documentation at [[{{#replace:Module:Format eq stat|/doc}}/doc]]. [[{{fullurl:{{#replace:Module:Format eq stat|/doc}}/doc|action=edit}} edit]]{{#If:||}}
local p = {}

function p.signed(arg)
	local first_char = string.sub(arg, 1, 1)

	if first_char == '+' or first_char == '-' then
		return arg
	else
		return '+'..arg
	end
end

function p.main(frame)
	local args = frame:getParent().args

	local arg = args[1] or ''
	return p.signed(arg)
end

return p