Jump to content

Module:Road data/size/sandbox: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
adj
use require('strict') instead of require('Module:No globals')
Line 1: Line 1:
local p = {}
local p = {}


require('Module:No globals')
require('strict')
local getArgs = require('Module:Arguments').getArgs
local getArgs = require('Module:Arguments').getArgs
local format = mw.ustring.format
local format = mw.ustring.format

Revision as of 10:01, 21 October 2022

local p = {}

require('strict')
local getArgs = require('Module:Arguments').getArgs
local format = mw.ustring.format

local function main(args)
	local style = args.style
	
	if style == 'infobox' then
		return '70', '150'
	elseif style == 'small' then
		return '40', '90'
	elseif style == 'list' then
		return '25', '60'
	else
		return '20', '50'
	end
end

function p._size(args)
	return main(args)
end

function p.size(frame)
	local args = getArgs(frame)
	return p._size(args);
end

return p