LocalStorage used bar
This commit is contained in:
@@ -75,7 +75,9 @@ export function download(filename: string, text: string, type: string = "text/pl
|
||||
}, 0);
|
||||
}
|
||||
|
||||
export function getLocalStorageUsed(): number {
|
||||
export const MAX_LOCAL_STORAGE_MB = 5;
|
||||
|
||||
export function getLocalStorageUsedMB(): number {
|
||||
var total = 0;
|
||||
for (const x in localStorage) {
|
||||
// Value is multiplied by 2 due to data being stored in `utf-16` format, which requires twice the space.
|
||||
|
||||
Reference in New Issue
Block a user