-- Various utility functions.

local utils = {}

utils.contains = function(table, element)
    for key, value in pairs(table) do
        if type(key) == type(element) then
            if key == element then
                return true
            end
        else
            if value == element then
                return true
            end
        end
    end
    return false
end

return utils
