Module:Param Parse: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
No edit summary
(yes_no)
Line 48: Line 48:
end
end



return parse
-- Yes/No
local yes_no = {
['Yes'] = true,
['No'] = false,
['N/A'] = 'NIL',
}
function parse.yes_no(text)
if yes_no[text] then
return text
end
return nil
end
function parse.yes_no_smw(text)
if text == 'N/A' then
return nil
end
return yes_no[text] or nil
end


-- </nowiki>
-- </nowiki>