/**
 * asynchronously iterate an array.
 * :TODO improve function singature
 */
export async function asyncForEach(array: any[], callback: any) {
  for (let index = 0; index < array.length; index += 1) {
    // eslint-disable-next-line no-await-in-loop
    await callback(array[index], index, array);
  }
}
