--- Swaps keys with values, overwriting additional values if duplicated
-- @tparam table orig original table
-- @treturn table

function Table.swapKeyValue(orig)
	local tab = {}
	for key, val in pairs(orig) do
		tab[val] = key
	end
	return tab
end
