return function(t)local U=false local D=false local j=true local u=1 for t,L in pairs(t)do if type(t)=="\115\116\114\105\110\103"then D=true elseif type(t)=="\110\117\109\098\101\114"then if u~=t then j=false end U=true else return false end if D and U then return false end u=u+1 end if U then return j end return true end
--[[
	Returns false if the given table has any of the following:
		- a key that is neither a number or a string
		- a mix of number and string keys
		- number keys which are not exactly 1..#t
]]
return function(t)
	local containsNumberKey = false
	local containsStringKey = false
	local numberConsistency = true

	local index = 1
	for x, _ in pairs(t) do
		if type(x) == "string" then
			containsStringKey = true
		elseif type(x) == "number" then
			if index ~= x then
				numberConsistency = false
			end
			containsNumberKey = true
		else
			return false
		end

		if containsStringKey and containsNumberKey then
			return false
		end

		index = index + 1
	end

	if containsNumberKey then
		return numberConsistency
	end

	return true
end
