Socket
Socket
Sign inDemoInstall

vanilli-shop-client

Package Overview
Dependencies
Maintainers
1
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vanilli-shop-client - npm Package Compare versions

Comparing version 1.6.8 to 1.6.9

1

dist/models/product.d.ts

@@ -34,2 +34,3 @@ import { IBaseDto, IPropertyDto } from "./base";

static getLinkWithCategory(product: IProductDto): string;
private static parseCategoryName;
static getDiscountPercentage(product: IProductBaseDto): number;

@@ -36,0 +37,0 @@ static hasStock(product: IProductBaseDto): boolean;

@@ -26,4 +26,14 @@ "use strict";

}
return "/products/" + product.categoryName + "/" + ref + "?refType=" + refType;
var category = this.parseCategoryName(product);
return "/products/" + category + "/" + ref + "?refType=" + refType;
};
Product.parseCategoryName = function (product) {
var category = product.categoryName;
category = category.replace("/", "-");
category = category.replace(" ", "-");
category = category.replace("õ", "o");
category = category.replace("ä", "a");
category = category.replace("ö", "o");
return category.replace("ü", "u");
};
Product.getDiscountPercentage = function (product) {

@@ -30,0 +40,0 @@ var discountPrice = product.discountPrice;

2

package.json
{
"name": "vanilli-shop-client",
"version": "1.6.8",
"version": "1.6.9",
"description": "Client for Vanilli Shop API",

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

@@ -57,5 +57,16 @@ import {IBaseDto, IPropertyDto} from "./base";

return `/products/${product.categoryName}/${ref}?refType=${refType}`;
const category = this.parseCategoryName(product);
return `/products/${category}/${ref}?refType=${refType}`;
}
private static parseCategoryName(product: IProductDto) {
let category = product.categoryName;
category = category.replace("/", "-");
category = category.replace(" ", "-");
category = category.replace("õ", "o");
category = category.replace("ä", "a");
category = category.replace("ö", "o");
return category.replace("ü", "u");
}
static getDiscountPercentage(product: IProductBaseDto): number {

@@ -62,0 +73,0 @@ const discountPrice = product.discountPrice;

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