MCPcopy Create free account
hub / github.com/dailydotdev/apps / createPatchyDay

Function createPatchyDay

packages/shared/src/features/patchy/patchyDay.ts:23–28  ·  view source on GitHub ↗
(now: Date)

Source from the content-addressed store, hash-verified

21 `${now.getFullYear()}-${now.getMonth() + 1}-${now.getDate()}`;
22
23export const createPatchyDay = (now: Date): PatchyDay => ({
24 day: getPatchyDayKey(now),
25 reads: 0,
26 upvotes: 0,
27 bookmarks: 0,
28});
29
30const isCount = (value: unknown): value is number =>
31 typeof value === 'number' && Number.isFinite(value) && value >= 0;

Callers 3

patchyDay.spec.tsFile · 0.90
parsePatchyDayFunction · 0.85
addPatchyActivityFunction · 0.85

Calls 1

getPatchyDayKeyFunction · 0.85

Tested by

no test coverage detected