Kontent qismiga oʻtish

Modul:Yesno

Vikipediya, erkin ensiklopediya

Bu modul uchun Modul:Yesno/doc nomli hujjat sahifasini yaratishingiz mumkin

return function (val, default)

	val = type(val) == 'string' and val:lower() or val
	if val == nil then
		return nil
	elseif val == true 
		or val == 'yes'
		or val == 'y'
		or val == 'true'
		or val == 't'
		or val == 'on'
		or val == 'ha'
		or val == 'yoniq'
		or tonumber(val) == 1
	then
		return true
	elseif val == false
		or val == 'no'
		or val == 'n'
		or val == 'false'
		or val == 'f'
		or val == 'off'
		or val == 'yoʻq'
		or val == 'yoq'
		or val == 'oʻchiq'
		or val == 'ochiq'
		or tonumber(val) == 0
	then
		return false
	else
		return default
	end
end
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy