Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Refs: https://github.com/hiroppy/node-metrics
const fetch = require('node-fetch');
(async () => {
const url = 'https://nodejs.org/metrics/summaries/total.csv'
const csv = await fetch(url).then((res) => res.text());
let total = 0;
csv.split('\n').map(a => a.split(',')).slice(1, -1).forEach((item) => {
total += Number(item[1])
});
console.log(total.toLocaleString())
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.