UNPKG

spws

Version:

SharePoint Web Services Wrapper

14 lines (13 loc) 503 B
/** * @name asyncForEach * @description Creates an asynchronous for each iterator. * @param {array} array The array to be iterated over. * @param {function} callback A function that will be called for each iteration. * @example * * await asyncForEach([1, 2, 3, 4, 5], async (number) => { * // Do something asynchronous * }); */ declare const asyncForEach: <T>(array: T[], callback: (data: T, index: number, array: T[]) => void) => Promise<void>; export default asyncForEach;