feat: add basic syncing (untested)

This commit is contained in:
thecodrr
2020-02-11 16:28:28 +05:00
parent ef8e7a67c7
commit e4aaf97c5d
8 changed files with 120 additions and 21 deletions

View File

@@ -91,8 +91,8 @@ export default class Notebooks {
filter(query) {
if (!query) return [];
return tfun.filter(v => fuzzysearch(query, v.title + " " + v.description))(
this.all
);
let queryFn = v => fuzzysearch(query, v.title + " " + v.description);
if (query instanceof Function) queryFn = query;
return tfun.filter(queryFn)(this.all);
}
}