MCPcopy
hub / github.com/monkeytypegame/monkeytype / addBadge

Function addBadge

frontend/src/ts/db.ts:401–410  ·  view source on GitHub ↗
(badge: Badge)

Source from the content-addressed store, hash-verified

399}
400
401export function addBadge(badge: Badge): void {
402 const snapshot = getSnapshot();
403 if (!snapshot) return;
404
405 snapshot.inventory ??= {
406 badges: [],
407 };
408 snapshot.inventory.badges.push(badge);
409 setSnapshot(snapshot);
410}
411
412export async function getTestActivityCalendar(
413 yearString: string,

Callers 1

claimRewardsFunction · 0.90

Calls 3

setSnapshotFunction · 0.85
pushMethod · 0.80
getSnapshotFunction · 0.70

Tested by

no test coverage detected