Created
January 26, 2018 12:45
-
-
Save maiquealmeida/ad7ed5e1d7b1240b48a96037971a72b6 to your computer and use it in GitHub Desktop.
Implementação javascript de um forEach assincrono para ocasiões especiais. ;-)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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