MCPcopy Create free account
hub / github.com/bytebase/bytebase / moveKey

Function moveKey

frontend/src/utils/storage-migrate.ts:39–45  ·  view source on GitHub ↗
(oldKey: string, newKey: string)

Source from the content-addressed store, hash-verified

37];
38
39function 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
47function migrateLanguage() {
48 // Old format: key "bytebase_options", value {"appearance":{"language":"zh-CN"}}

Callers 5

migrateStaticKeysFunction · 0.85
migratePrefixKeysFunction · 0.85
migrateUIScopeKeysFunction · 0.85
migrateSqlEditorTabKeysFunction · 0.85
migrateSqlEditorConnKeysFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected