-
-
Save theburningmonk/6b49d6036f382f56eedb2250b5d66825 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