mirror of
https://github.com/bitwarden/browser.git
synced 2024-10-18 07:25:15 +02:00
13 lines
332 B
TypeScript
13 lines
332 B
TypeScript
|
export function portName(storageLocation: chrome.storage.StorageArea) {
|
||
|
switch (storageLocation) {
|
||
|
case chrome.storage.local:
|
||
|
return "local";
|
||
|
case chrome.storage.sync:
|
||
|
return "sync";
|
||
|
case chrome.storage.session:
|
||
|
return "session";
|
||
|
default:
|
||
|
throw new Error("Unknown storage location");
|
||
|
}
|
||
|
}
|