mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 15:19:01 +02:00
15 lines
429 B
TypeScript
15 lines
429 B
TypeScript
const API_URL = "https://api.github.com/repos/TriliumNext/Trilium";
|
|
|
|
/** Returns the number of stargazers of the Trilium's GitHub repository. */
|
|
export async function getRepoStargazersCount() {
|
|
const response = await fetch(API_URL);
|
|
|
|
if (response.ok) {
|
|
const details = await response.json();
|
|
if ("stargazers_count" in details) {
|
|
return details["stargazers_count"];
|
|
}
|
|
}
|
|
|
|
return 31862; // The count as of 2025-10-03
|
|
} |