Module:NYC bus link/sandbox explained

require('strict');local getArgs = require('Module:Arguments').getArgslocal p =

function p.getLink(frame) local args = getArgs(frame); local city; if 'NYC'

args.city then city = 'New York City bus'; elseif 'LI'

args.city then city = 'Long Island bus'; elseif 'NJ'

args.city then city = 'New Jersey bus'; end local result = ; for _, name in ipairs (args) do table.insert (result, table.concat) end local prose; if 'yes' or 'y'

args.prose then return mw.text.listToText (result, ', ', ' and '); else return table.concat (result, ', '); endend

return p;