UNPKG

@authlocal/authlocal

Version:

User-sovereign Logins For All

10 lines (7 loc) 223 B
export function migrateStorageKeyRename(storage: Storage, oldKey: string, newKey: string) { const oldValue = storage.getItem(oldKey) if (oldValue) { storage.removeItem(oldKey) storage.setItem(newKey, oldValue) } }