@elastic-suite/gally-admin-shared
Version:
Shared package for gally admin BO
18 lines (15 loc) • 408 B
text/typescript
export function storageGet(key: string): string {
if (typeof window !== 'undefined') {
return localStorage.getItem(key)
}
}
export function storageSet(key: string, value: string): void {
if (typeof window !== 'undefined') {
localStorage.setItem(key, value)
}
}
export function storageRemove(key: string): void {
if (typeof window !== 'undefined') {
localStorage.removeItem(key)
}
}