New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@symbolic/lib

Package Overview
Dependencies
Maintainers
5
Versions
226
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@symbolic/lib - npm Package Compare versions

Comparing version 1.0.216 to 1.0.217

2

package.json
{
"name": "@symbolic/lib",
"version": "1.0.216",
"version": "1.0.217",
"description": "plain js utilities",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -5,16 +5,19 @@ import _ from "lodash";

return function getUsedEngravingCount({productInstance, productOptionsById, productsById, productRulesById, productPropertiesById, productInstancesById, productPropertyId, arrayLength, productProperty}) {
var usedEngravingCount = 0;
var usedTextEngravingsCount = 0;
var usedSymbolEngravingsCount = 0;
var isUsingSymbols = _.get(productInstance, 'properties[25].optionId') === 626;
var isUsingCustomEngravings = _.has(productInstance, `properties.${productPropertyId}.engravings`);
if (isUsingSymbols) {
var productInstanceEngravingSymbols = _.get(productInstance, `properties.${productPropertyId}.symbols`);
if (isUsingCustomEngravings) {
var productInstanceEngravings = _.get(productInstance, `properties.${productPropertyId}.engravings`);
_.times(arrayLength, (inputIndex) => {
var symbolForInputIndex = _.get(productInstanceEngravingSymbols, inputIndex);
_.times(arrayLength, (mechanismIndex) => {
var engravingsForMechanism = productInstanceEngravings[mechanismIndex];
var flatEngravingsForMechanism = _.flatMapDeep(engravingsForMechanism);
if (symbolForInputIndex && symbolForInputIndex !== 'noSymbol') {
usedEngravingCount += 1;
}
_.forEach(flatEngravingsForMechanism, (engraving) => {
if (engraving.text && engraving.text !== '') usedTextEngravingsCount += 1;
if (engraving.symbol && engraving.symbol !== '') usedSymbolEngravingsCount += 1;
});
});

@@ -44,3 +47,3 @@ }

if (_.get(productInstanceEngravingText, `${inputIndex}.${engravingIndex}`)) {
usedEngravingCount += 1;
usedTextEngravingsCount += 1;
}

@@ -51,5 +54,6 @@ });

return usedEngravingCount;
usedEngravingCount = usedTextEngravingsCount + usedSymbolEngravingsCount;
return {usedEngravingCount, usedTextEngravingsCount, usedSymbolEngravingsCount};
}
}
}

@@ -64,5 +64,5 @@ import _ from "lodash";

if (props.customLogicKey === 'engravings') {
var usedEngravingCount = getUsedEngravingCount({productInstance, productPropertyId: props.productPropertyId, productOptionsById, productsById, productRulesById, productPropertiesById, productInstancesById, arrayLength, productProperty});
var {usedEngravingCount, usedTextEngravingsCount, usedSymbolEngravingsCount} = getUsedEngravingCount({productInstance, productPropertyId: props.productPropertyId, productOptionsById, productsById, productRulesById, productPropertiesById, productInstancesById, arrayLength, productProperty});
if (usedEngravingCount > 0) {
if (usedTextEngravingsCount > 0) {
number = props.firstEngravingPrice;

@@ -72,2 +72,7 @@

}
if (usedSymbolEngravingsCount > 0) {
number = props.symbolEngravings.firstEngravingPrice;
number += (usedEngravingCount - 1) * props.symbolEngravings.subsequentEngravingPrice;
}
}

@@ -74,0 +79,0 @@ }

Sorry, the diff of this file is too big to display

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