1
0
mirror of https://github.com/oceanprotocol/community-numbers.git synced 2024-12-22 09:13:24 +01:00

faster github stars count

This commit is contained in:
Matthias Kretschmann 2020-06-16 16:49:17 +02:00
parent 87971dff2c
commit abc037903c
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -25,16 +25,7 @@ export default async function fetchGitHubRepos() {
}
const json = await response.json()
const numbers = []
json.map((item) => {
if (item.stargazers_count) {
return numbers.push(item.stargazers_count)
}
return null
})
const numbers = json.map((item) => item.stargazers_count)
const stars = arrSum(numbers)
const repositories = json.length