function t.keys(J)assert(t.callback(J))return function(Y)local U,u=t.table(Y)if U==false then return false,u or""end for Y in Y do local U,u=J(Y)if U==false then return false,string.format("\098\097\100 \107\101\121 \037\115\058\n\t\037\115",tostring(Y),u or"")end end return true end end
--[[**
	ensures all keys in given table pass check

	@param check The function to use to check the keys

	@returns A function that will return true iff the condition is passed
**--]]
function t.keys(check)
	assert(t.callback(check))
	return function(value)
		local tableSuccess, tableErrMsg = t.table(value)
		if tableSuccess == false then
			return false, tableErrMsg or ""
		end

		for key in value do
			local success, errMsg = check(key)
			if success == false then
				return false, string.format("bad key %s:\n\t%s", tostring(key), errMsg or "")
			end
		end

		return true
	end
end
