return function(V,B,G)if not V or not B then return false elseif V==B then return true end if not G then G={}end for V,F in pairs(V)do if B[V]~=F and not G[V]then return false end end for B,F in pairs(B)do if V[B]~=F and not G[B]then return false end end return true end

return function(A, B, ignore)
	if not A or not B then
		return false
	elseif A == B then
		return true
	end
	if not ignore then
		ignore = {}
	end

	for key, value in pairs(A) do
		if B[key] ~= value and not ignore[key] then
			return false
		end
	end
	for key, value in pairs(B) do
		if A[key] ~= value and not ignore[key] then
			return false
		end
	end

	return true
end
