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
0
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.19.0 to 2.19.1-cx24-70222.1

2

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

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

@@ -109,10 +109,17 @@ const ProductStatus = require("../models/productStatus");

function mapSkusToProducts(skus, products){
function mapSkusToProducts(skus , products){
let newProducts = products.data.productsById.products.filter((n) => {
return n.id != null
})
const productsData = [];
if (products && products.length) {
if (products &&
products.data &&
products.data.productsById &&
products.data.productsById.products &&
products.data.productsById.products.length) {
skus.forEach((sku)=>{
const matchedProducts = products.filter((product)=>{
const matchedProducts = newProducts.filter((product)=>{
let matched = false;
if(product.id) {matched = product.id === sku;}
if(product.variants && product.variants.length){
if(product.variants.length){
product.variants.forEach((variant)=>{

@@ -133,2 +140,3 @@ matched |= variant.sku === sku;

/**

@@ -135,0 +143,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