MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / normalizePriority

Function normalizePriority

src/shared/tasks.ts:83–90  ·  view source on GitHub ↗
(raw: string | undefined)

Source from the content-addressed store, hash-verified

81}
82
83function normalizePriority(raw: string | undefined): TaskPriority | undefined {
84 if (!raw) return undefined
85 const v = raw.toLowerCase().trim()
86 if (v === 'high' || v === 'h') return 'high'
87 if (v === 'med' || v === 'medium' || v === 'm') return 'med'
88 if (v === 'low' || v === 'l') return 'low'
89 return undefined
90}
91
92function isValidIsoDate(s: string): boolean {
93 if (!/^\d{4}-\d{2}-\d{2}$/.test(s)) return false

Callers 2

parseNoteDefaultsFunction · 0.70
extractTokensFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected