MCPcopy Create free account
hub / github.com/freeCodeCamp/freeCodeCamp / getSessionChallengeData

Function getSessionChallengeData

client/src/utils/session-storage.ts:39–52  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

37type SessionChallengeData = AfterSave | BeforeSave;
38
39export const getSessionChallengeData = (): SessionChallengeData => {
40 if (isSaved()) {
41 return {
42 isSaved: true,
43 currentCount: getCurrentCount(),
44 countSinceSave: getCurrentCount() - getSavedCount()
45 };
46 } else {
47 return {
48 isSaved: false,
49 currentCount: getCurrentCount()
50 };
51 }
52};

Callers 2

Calls 3

isSavedFunction · 0.85
getCurrentCountFunction · 0.85
getSavedCountFunction · 0.85

Tested by

no test coverage detected