Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
get(propertyKey: string): T {
return getValue(propertyKey, this.map);
}
getRaw(propertyKey: string): any {
if (["scopes"].includes(propertyKey)) {
return {
...this.default.get(propertyKey),
...this.map.get(propertyKey)
};
}
const value = getValue(propertyKey, this.map);
if (value !== undefined) {
return value;
}
return getValue(propertyKey, this.default);
}
return value.replace(/\${([\w.]+)}/gi, (match, key) => getValue(key, this.map));
}
getRaw(propertyKey: string): any {
if (["scopes"].includes(propertyKey)) {
return {
...this.default.get(propertyKey),
...this.map.get(propertyKey)
};
}
const value = getValue(propertyKey, this.map);
if (value !== undefined) {
return value;
}
return getValue(propertyKey, this.default);
}
get(propertyKey: string): T {
return this.resolve(
getValue(propertyKey, {
get: (key: any) => this._map.get(key)
})
);
}
return (value: any) => getValue(expression, value);
}
get(propertyKey: string): T {
return this.resolve(getValue(propertyKey, this.map));
}
eval(expression: string, scope: any, clone: boolean = true): any {
if (isEmpty(expression)) {
return typeof scope === "object" && clone ? ParseService.clone(scope) : scope;
}
const value = getValue(expression, scope);
return typeof value === "object" && clone ? ParseService.clone(value) : value;
}
}