Leaguepedia | League of Legends Esports Wiki
Advertisement

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

local util_args = require('Module:ArgsUtil')
local LOOKUP = mw.loadData('Module:Orgnames')
local p = {}

function p.streamingPlatform(frame)
	local args = util_args.merge()
	if not args.url then return nil end
	return args.display or p._streamingPlatform(args.url)
end

function p._streamingPlatform(str)
	for search, platform in pairs(LOOKUP.streams) do
		if str:find(search, 1, true) then
			return platform
		end
	end
end

return p
Advertisement