MCPcopy Create free account
hub / github.com/massCodeIO/massCode / readExistingStats

Function readExistingStats

docs/website/scripts/update-github-stats.mjs:10–24  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

8const startYear = 2019
9
10async function readExistingStats() {
11 try {
12 return JSON.parse(await readFile(outputPath, 'utf-8'))
13 }
14 catch {
15 return {
16 repository,
17 stars: 0,
18 releaseDownloads: 0,
19 activeDevelopmentStartYear: startYear,
20 activeDevelopmentYears: new Date().getUTCFullYear() - startYear,
21 updatedAt: null,
22 }
23 }
24}
25
26function createHeaders() {
27 const headers = {

Callers 1

updateStatsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected