rebrowser-puppeteer-core
Version:
A drop-in replacement for puppeteer-core patched with rebrowser-patches. It allows to pass modern automation detection tests.
29 lines • 694 B
JavaScript
/**
* @internal
*/
export class AsyncIterableUtil {
static async *map(iterable, map) {
for await (const value of iterable) {
yield await map(value);
}
}
static async *flatMap(iterable, map) {
for await (const value of iterable) {
yield* map(value);
}
}
static async collect(iterable) {
const result = [];
for await (const value of iterable) {
result.push(value);
}
return result;
}
static async first(iterable) {
for await (const value of iterable) {
return value;
}
return;
}
}
//# sourceMappingURL=AsyncIterableUtil.js.map