-
-
Save ddotx/ea95a63796b0bf8a7f7c6d7c37a95222 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const http = require('axios') | |
module.exports.handler = async (urls) => { | |
const promises = urls.map(async url => { | |
return (await http.get(url)).data.length | |
}) | |
const counts = await Promise.all(promises) | |
return counts.reduce((x, acc) => x + acc, 0) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment