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