qcobjects
Version:
QCObjects is an Open-source framework that empowers full-stack developers to make micro-services and micro-frontends into an N-Tier architecture.
17 lines (16 loc) • 478 B
text/typescript
export var localStorage:any = window.localStorage;
if (typeof localStorage === "undefined") {
/* Polyfill for localStorage */
localStorage = {
getItem(name:string):any {
return (Object.hasOwn(this, name)) ? (this[name]) : (null);
},
setItem(name:string, value:any) {
this[name] = value;
},
removeItem(name:string) {
delete this[name];
}
};
/* end Polyfill for localStorage */
}