Jump to content

Module:av-utilities

From Wiktionary, the free dictionary


local m_links = require('Module:links')

local export = {}

local lang = require("Module:languages").getByCode("av")

function export.main(frame)
	if type(p[frame.args[1]]) == 'function' then
		return p[frame.args[1]](frame.args[2], frame.args[3])
	else
		return p[frame.args[1]][frame.args[2]]
	end
end

function export.make_stem2(stem)
	for _, pattern in ipairs(patterns) do
		local key = pattern[1]
		local val = pattern[2]
		if mw.ustring.match(stem, key .. "$") then
			stem = mw.ustring.gsub(stem, key .. "$", val)
			require("Module:debug").track("av-utilities/" .. key)
			return stem
		end
	end
	require("Module:debug").track("la-utilities")
	return stem
end

return export