Skip to content

Instantly share code, notes, and snippets.

@ddotx
Forked from theburningmonk/sequential.js
Created August 5, 2023 11:37
Show Gist options
  • Save ddotx/2f1bf0652fb6102ea80ff71ef40fa9ac to your computer and use it in GitHub Desktop.
Save ddotx/2f1bf0652fb6102ea80ff71ef40fa9ac to your computer and use it in GitHub Desktop.
const http = require('axios')
module.exports.handler = async (urls) => {
let sum = 0
for (let i = 0; i < urls.length; i++) {
const url = urls[i]
const body = (await http.get(url)).data
sum += body.length
}
return sum
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment