(oldKey: string, newKey: string)
| 37 | ]; |
| 38 | |
| 39 | function moveKey(oldKey: string, newKey: string) { |
| 40 | const value = localStorage.getItem(oldKey); |
| 41 | if (value !== null && localStorage.getItem(newKey) === null) { |
| 42 | localStorage.setItem(newKey, value); |
| 43 | } |
| 44 | localStorage.removeItem(oldKey); |
| 45 | } |
| 46 | |
| 47 | function migrateLanguage() { |
| 48 | // Old format: key "bytebase_options", value {"appearance":{"language":"zh-CN"}} |
no outgoing calls
no test coverage detected