/** Loop an iterable with the ability to place a non-blocking `await` in the loop itself */ export default async function asyncForEach( iterable: Iterable, iteratee: (item: Item) => Promise, ): Promise { await Promise.all([...iterable].map(async item => iteratee(item))); }