Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
this.resizeMediaUrl = config.resizeMediaUrl;
if (config.dto && config.dto.dto) {
config.dto = config.dto.dto; //defence patch due to mis-use of item-core
if (utils.isDev()) {
console.warn('Item core is created with already existing item core');
}
}
this.dto = {...config.dto};
if (config.scheme) {
this.processScheme(config.scheme);
} else {
const dto = {};
Object.assign(dto, this.dto, this.metadata);
this.processScheme(new Item({ dto }).scheme);
}
if (this.dto) {
const itemMetadata = this.dto.metaData || this.dto.metadata;
if (itemMetadata) {
//metadata is encoded encoded, parsed if needed
this.dto.metaData = utils.parseStringObject(itemMetadata);
}
}
this.sharpParams = {...config.sharpParams};
if (!this.sharpParams.quality) {
this.sharpParams.quality = 90;
}
if (!this.sharpParams.usm) {
this.sharpParams.usm = {};