This commit is contained in:
dmitry-vsl
2025-05-30 19:59:02 +00:00
parent 1a30311de4
commit 75b1c5e942
30 changed files with 959 additions and 832 deletions

View File

@@ -1,7 +1,8 @@
import _ from 'https://unpkg.com/lodash-es'
import _ from "lodash-es"
async function getPopularLanguages() {
const url = 'https://api.github.com/search/repositories?q=stars:%3E1&sort=stars'
const url =
"https://api.github.com/search/repositories?q=stars:%3E1&sort=stars"
const resp = await fetch(url)
const repos = await resp.json()
return _(repos.items)
@@ -9,7 +10,7 @@ async function getPopularLanguages() {
.filter(l => l != null)
.countBy()
.toPairs()
.orderBy(([lang, useCount]) => useCount, 'desc')
.orderBy(([lang, useCount]) => useCount, "desc")
.map(([lang]) => lang)
.value()
}