Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sap-ux/fe-mockserver-core

Package Overview
Dependencies
Maintainers
3
Versions
212
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap-ux/fe-mockserver-core - npm Package Compare versions

Comparing version 1.1.84 to 1.1.85

74

dist/data/dataAccess.js

@@ -815,39 +815,41 @@ "use strict";

});
const aggregateDefinition = applyDefinition.subTransformations[0];
aggregateDefinition.aggregateDef.forEach((subAggregateDefinition) => {
let propValue;
if (subAggregateDefinition.operator === undefined &&
mockData &&
mockData.hasCustomAggregate(subAggregateDefinition.name, odataRequest)) {
propValue = mockData.performCustomAggregate(subAggregateDefinition.name, dataToAggregate, odataRequest);
}
else {
dataToAggregate.forEach((dataLine) => {
const currentValue = dataLine[subAggregateDefinition.sourceProperty];
if (propValue === undefined) {
propValue = currentValue;
}
else {
switch (subAggregateDefinition.operator) {
case 'max':
propValue = Math.max(propValue, currentValue);
break;
case 'min':
propValue = Math.min(propValue, currentValue);
break;
case 'average':
propValue += currentValue;
break;
default:
propValue += currentValue;
break;
if (applyDefinition.subTransformations.length > 0) {
const aggregateDefinition = applyDefinition.subTransformations[0];
aggregateDefinition.aggregateDef.forEach((subAggregateDefinition) => {
let propValue;
if (subAggregateDefinition.operator === undefined &&
mockData &&
mockData.hasCustomAggregate(subAggregateDefinition.name, odataRequest)) {
propValue = mockData.performCustomAggregate(subAggregateDefinition.name, dataToAggregate, odataRequest);
}
else {
dataToAggregate.forEach((dataLine) => {
const currentValue = dataLine[subAggregateDefinition.sourceProperty];
if (propValue === undefined) {
propValue = currentValue;
}
}
});
}
if (subAggregateDefinition.operator === 'average') {
propValue = propValue / dataToAggregate.length;
}
outData[subAggregateDefinition.name] = propValue;
});
else {
switch (subAggregateDefinition.operator) {
case 'max':
propValue = Math.max(propValue, currentValue);
break;
case 'min':
propValue = Math.min(propValue, currentValue);
break;
case 'average':
propValue += currentValue;
break;
default:
propValue += currentValue;
break;
}
}
});
}
if (subAggregateDefinition.operator === 'average') {
propValue = propValue / dataToAggregate.length;
}
outData[subAggregateDefinition.name] = propValue;
});
}
return outData;

@@ -854,0 +856,0 @@ });

{
"name": "@sap-ux/fe-mockserver-core",
"version": "1.1.84",
"version": "1.1.85",
"description": "SAP Fiori OData - Fiori elements mock server core",

@@ -5,0 +5,0 @@ "repository": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc