(array, asyncFilterFn)
| 47 | } |
| 48 | |
| 49 | export async function filterAsync(array, asyncFilterFn) { |
| 50 | const promises = array.map(async item => await asyncFilterFn(item) && item); |
| 51 | const result = await Promise.all(promises); |
| 52 | return result.filter(item => item); |
| 53 | } |
| 54 | |
| 55 | export async function someAsync(array, asyncSomeFn) { |
| 56 | const promises = array.map(asyncSomeFn); |
no outgoing calls
no test coverage detected