MCPcopy
hub / github.com/callumalpass/tasknotes / normalizeDateValue

Method normalizeDateValue

src/utils/TaskManager.ts:554–561  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

552 }
553
554 private normalizeDateValue(value: unknown): string | undefined {
555 if (typeof value !== "string" || value.length === 0) {
556 return undefined;
557 }
558
559 const date = getDatePart(value);
560 return date.length > 0 ? date : undefined;
561 }
562
563 private normalizeStringValues(value: unknown, includeScalar: boolean): string[] {
564 const values = Array.isArray(value) ? value : includeScalar && value ? [value] : [];

Calls 1

getDatePartFunction · 0.90

Tested by

no test coverage detected