local y={}function y.clipMask(g,H)assert(type(g)=="\116\097\098\108\101","\065\116\116\101\109\112\116 \116\111 \109\097\115\107 \111\110 \097 \110\111\110-\116\097\098\108\101\033")local k={}for o,T in pairs(g)do if H[o]==true then k[o]=T elseif type(H[o])=="\116\097\098\108\101"then k[o]=y.clipMask(g[o],H[o])end end return k end function y.find(y,g)for y,H in ipairs(y)do if H==g then return y end end end return y
local Util = {}

function Util.clipMask(data, mask)
	assert(type(data) == "table", "Attempt to mask on a non-table!")

	local clippedData = {}

	for k, v in pairs(data) do
		if mask[k] == true then
			clippedData[k] = v
		elseif type(mask[k]) == "table" then
			clippedData[k] = Util.clipMask(data[k], mask[k])
		end
	end

	return clippedData
end

function Util.find(array, value)
	for i, v in ipairs(array) do
		if v == value then
			return i
		end
	end
end

return Util
