mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-10-12 17:11:36 +08:00
24 lines
597 B
JavaScript
24 lines
597 B
JavaScript
![]() |
"use strict";
|
||
|
|
||
|
const Expression = require('./expression');
|
||
|
const NoteSet = require('../note_set');
|
||
|
|
||
|
/**
|
||
|
* Note is hidden when all its note paths start in hidden subtree (i.e. the note is not cloned into visible tree)
|
||
|
*/
|
||
|
class IsHiddenExp extends Expression {
|
||
|
execute(inputNoteSet, executionContext, searchContext) {
|
||
|
const resultNoteSet = new NoteSet();
|
||
|
|
||
|
for (const note of inputNoteSet.notes) {
|
||
|
if (note.isHiddenCompletely()) {
|
||
|
resultNoteSet.add(note);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
return resultNoteSet;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
module.exports = IsHiddenExp;
|