Module:If empty

Permanently protected module
From Meta, a Wikimedia project coordination wiki
This is an archived version of this page, as edited by Great Brightstar (talk | contribs) at 17:17, 14 May 2023. It may differ significantly from the current version.
Module documentation
local p = {}

function p.main(frame)
	local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:Ifempty', removeBlanks = false})

	local lastk = 0
	for k,v in ipairs(args) do
		if v ~= '' then
			return v
		end
		lastk = k
	end

end

return p