@@ -9,7 +9,7 @@ A collection of array-related async utilities.
99- Install by executing ` npm install @wojtekmaj/async-array-utils ` or ` yarn add @wojtekmaj/async-array-utils ` .
1010- Import by adding ` import * as asyncArrayUtils from '@wojtekmaj/async-array-utils' ` .
1111- Do stuff with it!
12- ``` js
12+ ``` ts
1313 const asyncMappedArr = await asyncMap ([1 , 2 , 3 ], async (x ) => x * 2 );
1414 ```
1515
@@ -39,7 +39,7 @@ Note: For optimization purposes, all iterations are ran concurrently. If you rel
3939
4040#### Sample usage
4141
42- ``` js
42+ ``` ts
4343import { asyncEvery } from ' @wojtekmaj/async-array-utils' ;
4444
4545const largerThanZero = await asyncEvery ([1 , 2 , 3 ], async (el ) => el > 0 ); // true
@@ -51,7 +51,7 @@ Like `asyncEvery()`, but runs iterations non-concurrently.
5151
5252#### Sample usage
5353
54- ``` js
54+ ``` ts
5555import { asyncEveryStrict } from ' @wojtekmaj/async-array-utils' ;
5656
5757const indexes = [];
@@ -70,7 +70,7 @@ Note: For optimization purposes, all iterations are ran concurrently. If you rel
7070
7171#### Sample usage
7272
73- ``` js
73+ ``` ts
7474import { asyncFilter } from ' @wojtekmaj/async-array-utils' ;
7575
7676const asyncFilteredArr = await asyncFilter ([1 , 2 , 3 ], async (el ) => el > 1 ); // [2, 3]
@@ -82,7 +82,7 @@ Like `asyncFilter()`, but runs iterations non-concurrently.
8282
8383#### Sample usage
8484
85- ``` js
85+ ``` ts
8686import { asyncFilterStrict } from ' @wojtekmaj/async-array-utils' ;
8787
8888const indexes = [];
@@ -99,7 +99,7 @@ Returns the first element in the provided array that satisfies the provided test
9999
100100#### Sample usage
101101
102- ``` js
102+ ``` ts
103103import { asyncFind } from ' @wojtekmaj/async-array-utils' ;
104104
105105const asyncFoundEl = await asyncFind ([1 , 2 , 3 ], async (el ) => el > 1 ); // 2
@@ -111,7 +111,7 @@ Returns the index of the first element in an array that satisfies the provided t
111111
112112#### Sample usage
113113
114- ``` js
114+ ``` ts
115115import { asyncFindIndex } from ' @wojtekmaj/async-array-utils' ;
116116
117117const asyncFoundIndex = await asyncFindIndex ([1 , 2 , 3 ], async (el ) => el > 1 ); // 1
@@ -125,7 +125,7 @@ Note: For optimization purposes, all iterations are ran concurrently. If you rel
125125
126126#### Sample usage
127127
128- ``` js
128+ ``` ts
129129import { asyncForEach } from ' @wojtekmaj/async-array-utils' ;
130130
131131await asyncForEach ([1 , 2 , 3 ], async (el ) => {
@@ -139,7 +139,7 @@ Like `asyncForEach()`, but runs iterations non-concurrently.
139139
140140#### Sample usage
141141
142- ``` js
142+ ``` ts
143143import { asyncForEachStrict } from ' @wojtekmaj/async-array-utils' ;
144144
145145const indexes = [];
@@ -158,7 +158,7 @@ Note: For optimization purposes, all iterations are ran concurrently. If you rel
158158
159159#### Sample usage
160160
161- ``` js
161+ ``` ts
162162import { asyncMap } from ' @wojtekmaj/async-array-utils' ;
163163
164164const asyncMappedArr = await asyncMap ([1 , 2 , 3 ], async (el ) => el * 2 ); // [2, 4, 6]
@@ -170,7 +170,7 @@ Like `asyncMap()`, but runs iterations non-concurrently.
170170
171171#### Sample usage
172172
173- ``` js
173+ ``` ts
174174import { asyncMapStrict } from ' @wojtekmaj/async-array-utils' ;
175175
176176const indexes = [];
@@ -187,7 +187,7 @@ Executes a reducer asynchronous function (that you provide) on each element of t
187187
188188#### Sample usage
189189
190- ``` js
190+ ``` ts
191191import { asyncReduce } from ' @wojtekmaj/async-array-utils' ;
192192
193193const result = await asyncReduce (
@@ -207,7 +207,7 @@ Note: For optimization purposes, all iterations are ran concurrently. If you rel
207207
208208#### Sample usage
209209
210- ``` js
210+ ``` ts
211211import { asyncSome } from ' @wojtekmaj/async-array-utils' ;
212212
213213const largerThanZero = await asyncSome ([1 , 2 , 3 ], async (el ) => el > 0 ); // true
@@ -219,7 +219,7 @@ Like `asyncSome()`, but runs iterations non-concurrently.
219219
220220#### Sample usage
221221
222- ``` js
222+ ``` ts
223223import { asyncSomeStrict } from ' @wojtekmaj/async-array-utils' ;
224224
225225const indexes = [];
0 commit comments