Module:User:Od1n/If empty (simple Lua)

From Wikipedia, the free encyclopedia
This is the current revision of this page, as edited by imported>Anomie at 03:59, 23 November 2025 (Anomie moved page Module:Sandbox/Od1n/If empty (simple Lua) to Module:User:Od1n/If empty (simple Lua) without leaving a redirect: Revert undiscussed move (WP:RMUM): User:Gonnym, as you are already aware, there are two conventions for sandbox modules. Please stop trying to create a WP:FAITACCOMPLI for your preferred one.). The present address (URL) is a permanent link to this version.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
local p = {}

function p.main(frame)
	local args = frame:getParent().args
	local mwTrim = mw.text.trim

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

end

return p