Skip to content

Instantly share code, notes, and snippets.

@maiquealmeida
Created January 26, 2018 12:45
Show Gist options
  • Save maiquealmeida/ad7ed5e1d7b1240b48a96037971a72b6 to your computer and use it in GitHub Desktop.
Save maiquealmeida/ad7ed5e1d7b1240b48a96037971a72b6 to your computer and use it in GitHub Desktop.
Implementação javascript de um forEach assincrono para ocasiões especiais. ;-)
module.exports = async function (array, callback) {
for (let index = 0; index < array.length; index++) {
await callback(array[index], index, array)
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment