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

@nuskin/ns-product-lib

Package Overview
Dependencies
Maintainers
5
Versions
494
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuskin/ns-product-lib - npm Package Compare versions

Comparing version 2.17.1-cx24-67682.1 to 2.17.1-cx24-67682.2

2

package.json
{
"name": "@nuskin/ns-product-lib",
"version": "2.17.1-cx24-67682.1",
"version": "2.17.1-cx24-67682.2",
"description": "This project contains shared Product models and code between the backend and frontend.",

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

@@ -441,22 +441,36 @@ const axios = require('axios').default;

}
return kitBundleProducts.kitProducts.map((kitProduct) => {
const { product } = kitProduct;
const arr1 = []
for (const variant of product.variants) {
arr1.push({
if (product.variants.length > 1) {
for (const variant of product.variants) {
return {
productId: product.id,
skuId: variant.sku,
type: 'MANDATORY',
skuQuantity: variant.availableQuantity,
// eslint-disable-next-line max-len
availableChannels: Array.isArray(kitBundleProducts.availableChannels) ? kitBundleProducts.availableChannels.join(',') : kitBundleProducts.availableChannels,
inventory: {
atpQty: variant.availableQuantity,
backOrdered: variant.status.isBackordered,
backOrderedQty: variant.availableQuantity
}
}
}
} else {
const defaultVariant = product.variants[0];
return {
productId: product.id,
skuId: variant.sku,
skuId: defaultVariant.sku,
type: 'MANDATORY',
skuQuantity: variant.availableQuantity,
// eslint-disable-next-line max-len
skuQuantity: kitProduct.quantity,
availableChannels: Array.isArray(kitBundleProducts.availableChannels) ? kitBundleProducts.availableChannels.join(',') : kitBundleProducts.availableChannels,
inventory: {
atpQty: variant.availableQuantity,
backOrdered: variant.status.isBackordered,
backOrderedQty: variant.availableQuantity
atpQty: defaultVariant.availableQuantity,
backOrdered: defaultVariant.status.isBackordered,
backOrderedQty: defaultVariant.availableQuantity
}
})
}
}
return Object.assign({}, arr1)
});

@@ -463,0 +477,0 @@ }

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