function PromiseUtils.any(S)local a=Promise.new()local function j(...)a:Resolve(...)end local function u(...)a:Reject(...)end for S,a in pairs(S)do a:Then(j,u)end return a end

function PromiseUtils.any(promises)
	local returnPromise = Promise.new()

	local function resolve(...)
		returnPromise:Resolve(...)
	end

	local function reject(...)
		returnPromise:Reject(...)
	end

	for _, promise in pairs(promises) do
		promise:Then(resolve, reject)
	end

	return returnPromise
end
