Created
October 23, 2018 17:07
-
-
Save tjjfvi/fff3a3b10ca563222a9976670fe1e4b9 to your computer and use it in GitHub Desktop.
Array.prototype,asyncMap(fn)
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
Array.prototype.asyncMap = function(fn){ | |
return Promise.all(this.map(fn)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment