[**@bondsports/general**](../README.md) • **Docs**

***

[@bondsports/general](../globals.md) / promiseAny

# Function: promiseAny()

> **promiseAny**(`promises`): `Promise`\<`boolean`\>

This function fulfills as soon as one of the promises in the iterable fulfills, with the value of the first promise that fulfills.
ECMA2020 introduced Promise.any() which is a built-in method that does the same thing.

## Parameters

• **promises**: `Promise`\<`boolean`\>[]

An iterable of unawaited promises to watch.

## Returns

`Promise`\<`boolean`\>

A promise that resolves with the value of the first promise to be fulfilled or rejects with an array of rejection reasons if the promises rejected.

## Defined in

[utils/general.util.ts:58](https://github.com/Bond-Sports/bondUtils/blob/545f16ceb055481acfd7641d7809c0f252d3a5e6/packages/general/src/utils/general.util.ts#L58)
