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

Function unquote

src/shared/tasks.ts:71–81  ·  view source on GitHub ↗
(v: string)

Source from the content-addressed store, hash-verified

69const FRONTMATTER_RE = /^---\n([\s\S]*?)\n---\n?/
70
71function unquote(v: string): string {
72 const trimmed = v.trim()
73 if (trimmed.length >= 2) {
74 const first = trimmed[0]
75 const last = trimmed[trimmed.length - 1]
76 if ((first === '"' || first === "'") && first === last) {
77 return trimmed.slice(1, -1)
78 }
79 }
80 return trimmed
81}
82
83function normalizePriority(raw: string | undefined): TaskPriority | undefined {
84 if (!raw) return undefined

Callers 2

normalizeDueDateFunction · 0.70
parseNoteDefaultsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected