Module:If empty

From the Dyson Sphere Program Wiki
Revision as of 05:35, 24 May 2023 by Antt1995 (talk | contribs) (Created page with "local p = {} function p.main(frame) local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false}) for k,v in ipairs(args) do if v ~= '' then return v end end end return p")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Module documentation[view][edit][history][purge]
This documentation is transcluded from Module:If empty/doc. Changes can be proposed in the talk page.
Function list
L 3 — p.main

This module implements {{If empty}}.


local p = {}

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

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

end

return p
🍪 We use cookies to keep session information to provide you a better experience.