@scalar/api-client
Version:
the open source API testing client
21 lines (20 loc) • 599 B
JavaScript
import { safeLocalStorage as e } from "@scalar/helpers/object/local-storage";
const t = "scalar.activeWorkspaceId", a = {
/**
* Retrieves the active workspace ID from localStorage.
* @returns {string | undefined} The currently active workspace ID, or undefined if not set.
*/
getActiveWorkspaceId() {
return e().getItem(t) ?? void 0;
},
/**
* Stores the given workspace ID as the active workspace in localStorage.
* @param {string} id - The workspace ID to set as active.
*/
setActiveWorkspaceId(o) {
e().setItem(t, o);
}
};
export {
a as workspaceStorage
};