1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
const plugins = await fetchJSON(
"https://raw.githubusercontent.com/obsidianmd/obsidian-releases/HEAD/community-plugins.json",
);
const stats = await fetchJSON(
"https://raw.githubusercontent.com/obsidianmd/obsidian-releases/HEAD/community-plugin-stats.json",
);
const pluginsWithStats = plugins
.map(plugin => ({
...plugin,
downloads: stats[plugin.id]?.downloads ?? -1,
}))
.sort((a, b) => b.downloads - a.downloads);
const topPlugins = pluginsWithStats
.slice(0, 100)
.map(({ name, downloads }) => ({ name, downloads }));
console.table(topPlugins);