Jump to content

Module:If any equal

Permanently protected module
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by MSGJ (talk | contribs) at 09:49, 20 December 2023 (create). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)

require('strict')
local p = {}

p.if_any = function(frame)
	local match = false
	for name, value in pairs(args) do
		if name:match('^%d+$') and value==frame.args.value then
			match = true
			break
		end
	end
	return match and 'yes' or 'no'
end

return p