Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Usage  





2 Examples  














Module:If any equal







Add links
 









Module
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 





Permanently protected module

From Wikipedia, the free encyclopedia
 


Usage

This module checks all positional parameters to see if any of them is equal to the parameter "value". If so, it will output "yes", otherwise "no".

Examples

require('strict')
local p = {}

p.main = function(frame)
 local match = false
 for name, value in pairs(frame.args) do
  if type(name)=='number' and value:lower()==frame.args.value:lower() then
   match = true
   break
  end
 end
 return match and 'yes' or 'no'
end

return p

Retrieved from "https://en.wikipedia.org/w/index.php?title=Module:If_any_equal&oldid=1190930528"

Categories: 
Modules for general use
If-then-else templates
Hidden category: 
Wikipedia extended-confirmed-protected modules
 



This page was last edited on 20 December 2023, at 18:00 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki