MCPcopy Index your code
hub / github.com/callumalpass/tasknotes / coerceDateOption

Function coerceDateOption

src/api/TaskNotesAPI.ts:3380–3383  ·  view source on GitHub ↗
(value: string | Date | null | undefined)

Source from the content-addressed store, hash-verified

3378}
3379
3380function coerceDateOption(value: string | Date | null | undefined): Date | null {
3381 if (!value) return null;
3382 return value instanceof Date ? value : new Date(value);
3383}
3384
3385function isRecord(value: unknown): value is Record<string, unknown> {
3386 return typeof value === "object" && value !== null && !Array.isArray(value);

Callers 1

getTimeSummaryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected