Skip to content

pickHighestPriorityNotePath

Picks the single highest-priority note among those referencing an attachment.

Returns null when the best rank is shared by more than one note, or when no note matches anything. Both are ties, and a tie is the caller’s problem: it is what the multiple-notes mode setting is for.

Import:

import { pickHighestPriorityNotePath } from '@mnaoumov/obsidian-lib/note-priority';

Signature:

function pickHighestPriorityNotePath(params: PickHighestPriorityNotePathParams): string | null

Parameters:

Parameter Type Description
params PickHighestPriorityNotePathParams The parameters for picking the note.

Returns: string | null — The winning note’s path, or null when there is no single winner.


Links to this page: