isIterableEqualAsync
isIterableEqualAsync<
T>(a,b,comparisonStrategy?,signal?):Promise<boolean>
Defined in: packages/core/src/iterable/async/is-iterable-equal.ts:27
Checks whether two iterables yield equal elements in the same order, and the same number of them.
The async counterpart of isIterableEqual. Both sides are advanced
concurrently, so a round costs the slower source rather than their sum.
Short-circuits on the first difference, closing whichever iterator has not
ended.
Time complexity: O(n) worst case.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”The first iterable, sync or async.
The second iterable, sync or async.
comparisonStrategy?
Section titled “comparisonStrategy?”EqualityComparisonStrategy<T, T> = IS_ITERABLE_EQUAL_DEFAULT_COMPARISON_STRATEGY
The equality comparison strategy to use (default is “strict”). Resolved once, not re-dispatched per element.
signal?
Section titled “signal?”AbortSignal
Aborts the comparison.
Returns
Section titled “Returns”Promise<boolean>
true if both iterables yield the same elements in the same order.