trilium/src/services/search/search_result.js
2020-05-17 09:48:24 +02:00

21 lines
471 B
JavaScript

"use strict";
const noteCacheService = require('../note_cache/note_cache_service');
class SearchResult {
constructor(notePathArray) {
this.notePathArray = notePathArray;
this.notePathTitle = noteCacheService.getNoteTitleForPath(notePathArray);
}
get notePath() {
return this.notePathArray.join('/');
}
get noteId() {
return this.notePathArray[this.notePathArray.length - 1];
}
}
module.exports = SearchResult;