AbdulElahGwaith's picture
Upload folder using huggingface_hub
84c1942 verified
Raw
History Blame Contribute Delete
406 Bytes
class LocalStorageMock {
store: { [key: string]: string };
constructor() {
this.store = {};
}
clear() {
this.store = {};
}
getItem(key: string) {
return this.store[key] || null;
}
setItem(key: string, value: string) {
this.store[key] = value;
}
removeItem(key: string) {
delete this.store[key];
}
}
// @ts-ignore
global.localStorage = new LocalStorageMock();