Module:If empty: Difference between revisions
Jump to navigation
Jump to search
imported>Codehydro |
imported>Jackmcbarn (greatly simplify) |
||
Line 1: | Line 1: | ||
local p = {} | |||
local p = {} | |||
function p. | function p.main(frame) | ||
for k,v in ipairs(require('Module:Arguments').getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false})) do | |||
if v ~= '' then | |||
return v | |||
end | |||
end | end | ||
end | end | ||
return p | return p |
Revision as of 19:08, 23 December 2014
Documentation for this module may be created at Module:If empty/doc
local p = {} function p.main(frame) for k,v in ipairs(require('Module:Arguments').getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false})) do if v ~= '' then return v end end end return p