Module:If empty: Difference between revisions

From the Dyson Sphere Program Wiki
(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")
 
m (1 revision imported: New Files)
 

Latest revision as of 11:54, 24 March 2024

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.