सामग्री पर जाएँ

"मॉड्यूल:If empty": अवतरणों में अंतर

From वर्ल्डपीडिया, the free encyclopedia
simpliy; just noticed the "preview page with this module" box... will no longer be doing weird tests XD
when frame args are relevant, they'll get picked up by Module:Arguments, and when they're not, that's just a waste of CPU cycles
पंक्ति २: पंक्ति २:


function p.main(frame)
function p.main(frame)
for _,v in ipairs(frame.args) do
if v ~= '' then
return v
end
end
for _,v in ipairs(require('Module:Arguments').getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false})) do
for _,v in ipairs(require('Module:Arguments').getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false})) do
if v ~= '' then
if v ~= '' then

०३:२१, २४ दिसम्बर २०१४ का अवतरण

"इस मॉड्यूल हेतु प्रलेख मॉड्यूल:If empty/doc पर बनाया जा सकता है"

local p = {}

function p.main(frame)
	for _,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