Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame
337 Bytes
const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
export const load = storageKey => {
if (isBrowser) {
return JSON.parse(window.localStorage.getItem(storageKey));
} else if (storageKey !== undefined) {
console.warn('storageKey support only on browser');
return undefined;
}
};