Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
before(() => {
map = new Map();
setValue("test.t1", "value2", map);
});
before(() => {
map = new Map();
setValue("test", "value", map);
});
before(() => {
setValue("test.t1", "value2", map);
});
setRaw(propertyKey: string, value: any) {
setValue(propertyKey, value, this.map);
return this;
}
set(propertyKey: string | IBootstrapSettings, value?: any): this {
if (typeof propertyKey === "string") {
setValue(propertyKey, value, this._map);
} else {
const self: any = this;
Object.keys(propertyKey).forEach(key => {
const descriptor = Object.getOwnPropertyDescriptor(SettingsService.prototype, key);
if (descriptor && ["set", "get", "providers"].indexOf(key) === -1) {
self[key] = propertyKey[key];
} else {
this._map.set(key, propertyKey[key]);
}
});
this._map.forEach((value, key) => {
this.set(key, this.resolve(value));
});
set(propertyKey: string | IServerSettings, value?: any): this {
if (typeof propertyKey === "string") {
setValue(propertyKey, value, this.map);
} else {
const self: any = this;
Object.keys(propertyKey).forEach(key => {
const descriptor = Object.getOwnPropertyDescriptor(ServerSettingsService.prototype, key);
if (descriptor && ["set", "map"].indexOf(key) === -1) {
self[key] = propertyKey[key];
} else {
this.set(key, propertyKey[key]);
}
});
this.forEach((value, key) => {
this.map.set(key, this.resolve(value));
});