@reactivex/ix-esnext-esm
Version:
The Interactive Extensions for JavaScript
16 lines (14 loc) • 524 B
JavaScript
import { comparerAsync } from '../util/comparer';
export async function sequenceEqual(source, other, comparer = comparerAsync) {
const it1 = source[Symbol.asyncIterator]();
const it2 = other[Symbol.asyncIterator]();
let next1;
let next2;
while (!(next1 = await it1.next()).done) {
if (!(!(next2 = await it2.next()).done && (await comparer(next1.value, next2.value)))) {
return false;
}
}
return !!(await it2.next()).done;
}
//# sourceMappingURL=sequenceequal.mjs.map