MCPcopy Create free account
hub / github.com/0010aor/FlashNotes / calculateSessionSuccessRate

Function calculateSessionSuccessRate

frontend/src/utils/stats.ts:14–19  ·  view source on GitHub ↗
(
  session: PracticeSessionStats | null,
)

Source from the content-addressed store, hash-verified

12}
13
14export const calculateSessionSuccessRate = (
15 session: PracticeSessionStats | null,
16): number | null => {
17 if (!session || session.cards_practiced === 0) return null
18 return Math.round((session.correct_answers / session.cards_practiced) * 100)
19}
20
21export function calculateLearningTrend(
22 sessions: PracticeSessionStats[] | undefined,

Callers 1

calculateLearningTrendFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected