unvendor: Replace localforage

This commit is contained in:
Cohee
2024-10-16 23:37:54 +03:00
parent 416282ae1f
commit 1c4e87b25b
9 changed files with 37 additions and 6 deletions

View File

@ -5,6 +5,7 @@
import Fuse from 'fuse.js';
import DOMPurify from 'dompurify';
import hljs from 'highlight.js';
import localforage from 'localforage';
/**
* Expose the libraries to the 'window' object.
@ -27,16 +28,22 @@ export function initLibraryShims() {
// @ts-ignore
window.hljs = hljs;
}
if (!('localforage' in window)) {
// @ts-ignore
window.localforage = localforage;
}
}
export default {
Fuse,
DOMPurify,
hljs,
localforage,
};
export {
Fuse,
DOMPurify,
hljs,
localforage,
};