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

Function findDateNoteByTitle

packages/app-core/src/lib/vault-layout.ts:1196–1208  ·  view source on GitHub ↗
(
  notes: readonly NoteMeta[],
  settings: VaultSettings | null | undefined,
  kind: DateNoteInfo['kind'],
  title: string
)

Source from the content-addressed store, hash-verified

1194}
1195
1196export function findDateNoteByTitle(
1197 notes: readonly NoteMeta[],
1198 settings: VaultSettings | null | undefined,
1199 kind: DateNoteInfo['kind'],
1200 title: string
1201): NoteMeta | null {
1202 for (const note of notes) {
1203 if (note.title !== title) continue
1204 const info = classifyDateNote(note, settings)
1205 if (info?.kind === kind) return note
1206 }
1207 return null
1208}
1209
1210// Match a path's top segment to a system folder case-insensitively. On
1211// case-insensitive filesystems (macOS/Windows) the inbox folder can be stored

Callers

nothing calls this directly

Calls 1

classifyDateNoteFunction · 0.85

Tested by

no test coverage detected