Skip to content

Commit 68c389c

Browse files
committed
renamed disordered to unordered
1 parent c6f404d commit 68c389c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

asynciter.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { collect } from "./collect.ts";
2-
import { concurrentDisorderedMap, concurrentMap } from "./concurrent-map.ts";
2+
import { concurrentUnorderedMap, concurrentMap } from "./concurrent-map.ts";
33
import { filter } from "./filter.ts";
44
import { first } from "./first.ts";
55
import { forEach } from "./for-each.ts";
@@ -93,14 +93,14 @@ export class AsyncIter<T> implements AsyncIterable<T> {
9393
* @param concurrency The maximum concurrency.
9494
* @returns An iterable of mapped values.
9595
*/
96-
public concurrentDisorderedMap<U>(
96+
public concurrentUnorderedMap<U>(
9797
mapFn: (item: T) => Promise<U>,
9898
concurrency?: number,
9999
): AsyncIter<U> {
100100
const iterable = this.iterator;
101101
return new AsyncIter({
102102
async *[Symbol.asyncIterator]() {
103-
yield* concurrentDisorderedMap(iterable, mapFn, concurrency);
103+
yield* concurrentUnorderedMap(iterable, mapFn, concurrency);
104104
},
105105
});
106106
}

concurrent-map.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export async function* concurrentMap<T, U>(
5252
* @param mapFn The mapping function.
5353
* @returns An iterator of mapped values.
5454
*/
55-
export async function* concurrentDisorderedMap<T, U>(
55+
export async function* concurrentUnorderedMap<T, U>(
5656
items: AsyncIterable<T>,
5757
mapFn: (item: T) => Promise<U>,
5858
concurrency?: number,

tests/asynciter.concurrent-map.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Deno.test({
3232
assertEquals(
3333
new Set(
3434
await asynciter(["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"])
35-
.concurrentDisorderedMap(
35+
.concurrentUnorderedMap(
3636
delayedResult(() => Math.ceil(10 + Math.random() * 100)),
3737
3,
3838
).collect(),

0 commit comments

Comments
 (0)