refactoring - moving stuff to separate files

This commit is contained in:
azivner
2017-09-09 12:06:15 -04:00
parent 7c623d9a0b
commit aad90f016b
12 changed files with 478 additions and 464 deletions

View File

@@ -14,6 +14,21 @@ function error(str) {
error.fadeOut(10000);
}
function getAutocompleteItems(notes) {
const autocompleteItems = [];
for (const noteId of notes) {
const fullName = getFullName(noteId);
autocompleteItems.push({
value: fullName + " (" + noteId + ")",
label: fullName
});
}
return autocompleteItems;
}
function uint8ToBase64(u8Arr) {
const CHUNK_SIZE = 0x8000; //arbitrary number
const length = u8Arr.length;