Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.map((notepad: FlatNotepad) => {
if (!!indices[notepad.title] && !indices[notepad.title].shouldReindex(new Date(), Object.keys(notepad.notes).length)) {
return { notepad: notepad, trie: indices[notepad.title] };
}
return { notepad: notepad, trie: Trie.buildTrie(notepad.notes) };
})
);