Skip to content

Commit

Permalink
Reduce code size
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Aug 18, 2024
1 parent 102d1c1 commit c8e2387
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions utilities.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
export function streamToIterable(stream) {
return {
[Symbol.asyncIterator]: stream[Symbol.asyncIterator].bind(stream),
};
}

export async function * combineAsyncIterables(iterable1, iterable2) {
const iterator1 = iterable1[Symbol.asyncIterator]();
const iterator2 = iterable2[Symbol.asyncIterator]();

export async function * combineAsyncIterables(iterator1, iterator2) {
while (true) {
// eslint-disable-next-line no-await-in-loop
const [result1, result2] = await Promise.all([
Expand Down

0 comments on commit c8e2387

Please sign in to comment.