feat(search): use dexie.js instead of localStorage by sy-records · Pull Request #2464 · docsifyjs/docsify
Implemented dexie.js instead of localStorage in this PR.
Removed parsing json strings.
db.version(1).stores({ search: 'slug, title, body, path, indexKey', expires: 'key, value', });
No changes to the search logic, no full-text search using Dexies. Putting indexKey into INDEXES for querying from IndexedDB.
And the storage size, which depends on the user's device and browser limitations, can be tesed using it.
if (navigator.storage && navigator.storage.estimate) {
navigator.storage.estimate().then(estimate => {
console.log(`Quota: ${estimate.quota}`);
console.log(`Usage: ${estimate.usage}`);
});
}
