MCPcopy Create free account
hub / github.com/anilkumarum/mark-clipper / constructor

Method constructor

panel/js/mdNote.js:7–17  ·  view source on GitHub ↗

* @param {{ pageTitle: string; time: string; author: string; imagePaths: any; tags: string; }} noteData * @param {string} path * @param {FileSystemDirectoryHandle} vaultHandle

(noteData, path, vaultHandle)

Source from the content-addressed store, hash-verified

5 * @param {FileSystemDirectoryHandle} vaultHandle
6 */
7 constructor(noteData, path, vaultHandle) {
8 path ??= noteData?.pageTitle;
9 const name = noteData?.pageTitle ?? path.slice(path.lastIndexOf("/") + 1);
10 this.name = name.endsWith(".md") ? name.slice(0, -3) : name;
11 this.path = path.endsWith(".md") ? path : path + ".md";
12 this.time = noteData?.time ?? "";
13 this.author = noteData?.author ?? "";
14 this.imagePaths = noteData?.imagePaths;
15 this.tags = noteData?.tags ?? "[]";
16 this.vaultHandle = vaultHandle;
17 }
18}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected