MCPcopy Create free account
hub / github.com/microsoft/SandDance / constructor

Method constructor

docs/app/js/sanddance-app.js:58407–58418  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

58405}
58406class LocalStorage {
58407 constructor(id){
58408 let defaultSettings = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
58409 let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "sessionStorage";
58410 (0, _definePropertyDefault.default)(this, "storage", void 0);
58411 (0, _definePropertyDefault.default)(this, "id", void 0);
58412 (0, _definePropertyDefault.default)(this, "config", {});
58413 this.storage = getStorage(type);
58414 this.id = id;
58415 this.config = {};
58416 Object.assign(this.config, defaultSettings);
58417 this._loadConfiguration();
58418 }
58419 getConfiguration() {
58420 return this.config;
58421 }

Callers

nothing calls this directly

Calls 2

_loadConfigurationMethod · 0.95
getStorageFunction · 0.70

Tested by

no test coverage detected