Module:RaritySort: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary Tag: Reverted |
||
Line 2: | Line 2: | ||
function p.getSortValue(rarity) | function p.getSortValue(rarity) | ||
if rarity == nil or type(rarity) ~= "string" then | if rarity == nil or type(rarity) ~= "string" then | ||
return | return "Input was nil or not string" | ||
end | end | ||
local r = mw.ustring.lower(rarity) | local r = mw.ustring.lower(rarity) | ||
-- Show what was passed in and how it's interpreted | |||
return "Input: " .. rarity .. " | Interpreted: " .. r | |||
end | end | ||
return p | return p |
Revision as of 17:11, 15 May 2025
Documentation for this module may be created at Module:RaritySort/doc
local p = {}
function p.getSortValue(rarity)
if rarity == nil or type(rarity) ~= "string" then
return "Input was nil or not string"
end
local r = mw.ustring.lower(rarity)
-- Show what was passed in and how it's interpreted
return "Input: " .. rarity .. " | Interpreted: " .. r
end
return p