Module:Tournament/Organizer

From TwogPedia
Revision as of 18:26, 26 April 2024 by Couchor (talk | contribs) (Created page with "local getArgs = require('Module:Arguments').getArgs local p = {} function p.main (frame) local args = getArgs(frame) if not args.list then return end local result = {} for value in mw.text.gsplit(args.list, ",") do table.insert(result, "Companies/" .. mw.text.trim(value)) end return table.concat(result, ",") end return p")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Documentation for this module may be created at Module:Tournament/Organizer/doc

local getArgs = require('Module:Arguments').getArgs

local p = {}

function p.main (frame)
  local args = getArgs(frame)
  if not args.list then return end
  
  local result = {}
  for value in mw.text.gsplit(args.list, ",") do
       table.insert(result, "Companies/" .. mw.text.trim(value))
  end

  return table.concat(result, ",")

end

return p