11# Iterable Async Methods
22
3- ## Async Map
3+ A collection of methods for looping iterable objects asynchronously using something similar to the Array api.
4+
5+ ## Methods
46
5- ```
6- /**
77* Async Map
8- * Map an array asynchronously and resolve when all callbacks are resolved
9- * Will map independently from order when callbacks are async
10- * @async
11- * @param {Function} callback - callback(currentValue, index, array)
12- * @param {Object} [thisArg] - must be iterable
13- * @return {Array}
14- * @throws {TypeError}
15- */
8+ * Async For Each
9+ * Async Filter
10+ * Async Find
11+ * Async Find Index
12+
13+ ### Async Map
14+
15+ Map an iterable object asynchronously
16+ ```
1617function asyncMap(callback, [thisArg]) {...}
1718```
1819
19- ## Async For Each
20+ ### Async For Each
2021
22+ Loop over an iterable object asynchronously
2123```
22- /**
23- * Async For Each
24- * Loop over an array asynchronously and resolve when all callbacks are resolved
25- * Will loop independently from order when callbacks are async
26- * @async
27- * @param {Function} callback - callback(currentValue, index, array)
28- * @param {Object} [thisArg] - must be iterable
29- * @throws {TypeError}
30- */
3124function asyncForEach(callback, [thisArg]) {...}
3225```
3326
34- ## Async Filter
27+ ### Async Filter
3528
29+ Filter an iterable object asynchronously
3630```
37- /**
38- * Async Filter
39- * Filter an iterable object asynchronously and resolve when all callbacks are resolved
40- * @async
41- * @param {Function} callback - callback(currentValue, index, array)
42- * @param {Object} [thisArg] - must be iterable
43- * @return {Array}
44- * @throws {TypeError}
45- */
4631function asyncFilter(callback, [thisArg]) {...}
4732```
4833
49- ## Async Find
34+ ### Async Find
5035
36+ Find an item in an iterable object asynchronously
5137```
52- /**
53- * Async Find
54- * Find an item in an iterable object asynchronously and resolve when found or all callbacks resolve
55- * @async
56- * @param {Function} callback - callback(currentValue, index, array)
57- * @param {Object} [thisArg] - must be iterable
58- * @return {any}
59- * @throws {TypeError}
60- */
38+ function asyncFind(callback, [thisArg]) {...}
6139```
6240
63- ## Async Find Index
41+ ### Async Find Index
6442
43+ Find an item's index in an iterable object asynchronously
6544```
66- /**
67- * Async Find Index
68- * Find an item's index in an iterable object asynchronously and resolve when found or all callbacks resolve
69- * @async
70- * @param {Function} callback - callback(currentValue, index, array)
71- * @param {Object} [thisArg] - must be iterable
72- * @return {Number} - an integer index, -1 if not found
73- * @throws {TypeError}
74- */
45+ function asyncFindIndex(callback, [thisArg]) {...}
7546```
7647
77- # Development
48+ ## Development
49+
50+ Development is open to contribution, check the project board "Development" for tickets.
7851
79- ## Scripts
52+ ### Scripts
8053
8154```
8255npm run lint
@@ -92,6 +65,6 @@ npm test
9265# Runs all tests
9366```
9467
95- ## Commit Rules
68+ ### Commit Rules
9669
97- * All commits should pass the lint check commandS
70+ * All commits should pass the lint check commands
0 commit comments