@nuskin/ns-product-lib
Advanced tools
Comparing version 1.3.4-cx15-3097.1 to 1.3.4
@@ -1,2 +0,2 @@ | ||
## [1.3.4-cx15-3097.1](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v1.3.3...v1.3.4-cx15-3097.1) (2021-05-10) | ||
## [1.3.4](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v1.3.3...v1.3.4) (2021-05-10) | ||
@@ -6,3 +6,3 @@ | ||
* added a method which was omitted in the migration of product.js from ns-shop (#CX15-3097) ([1f28c4d](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/1f28c4da9153eeb02305e59dc9b4a9165ef63e9a)), closes [#CX15-3097](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX15-3097) | ||
* fixed isExclusive evaluating occasional "[secure]" strings as true (#CX12-3323) ([f50ceb0](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/commit/f50ceb0101c11430f8cdb1458b249f9589b041b5)), closes [#CX12-3323](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/issues/CX12-3323) | ||
@@ -9,0 +9,0 @@ ## [1.3.3](https://code.tls.nuskin.io/ns-am/product/js-libs/ns-product-lib/compare/v1.3.2...v1.3.3) (2021-04-19) |
{ | ||
"name": "@nuskin/ns-product-lib", | ||
"version": "1.3.4-cx15-3097.1", | ||
"version": "1.3.4", | ||
"description": "This project contains shared Product models and code between the backend and frontend.", | ||
@@ -32,4 +32,4 @@ "main": "src/index.js", | ||
"dependencies": { | ||
"@nuskin/ns-common-lib": "1.2.3" | ||
"@nuskin/ns-common-lib": "1.3.0" | ||
} | ||
} |
"use strict"; | ||
const { isTrue } = require("@nuskin/ns-common-lib"); | ||
const ProductUtils = require("./productUtils.js"); | ||
@@ -350,17 +352,3 @@ | ||
}; | ||
this.getEventPriceTypes = () => { | ||
const eventPriceTypes = []; | ||
Object.keys(this.priceMap).forEach(priceTypeKey => { | ||
const eventPriceType = priceTypeKey.substring(0, priceTypeKey.indexOf(`-${this.priceType}`)); | ||
if (eventPriceType) { | ||
eventPriceTypes.push(eventPriceType); | ||
} | ||
}); | ||
return eventPriceTypes; | ||
}; | ||
this.getPvWithType = function(type) { | ||
@@ -552,3 +540,3 @@ let rv = this.pvMap[type]; | ||
this.longDescr = data.longDescr; | ||
this.isExclusive = !!data.isExclusive; | ||
this.isExclusive = isTrue(data.isExclusive); | ||
@@ -555,0 +543,0 @@ // WARNING: Browser Detection will need to be handled in the client |
"use strict"; | ||
const { isNullOrEmpty } = require("@nuskin/ns-common-lib"); | ||
const { isNullOrEmpty, isTrue } = require("@nuskin/ns-common-lib"); | ||
@@ -58,3 +58,3 @@ const Product = require("./product.js"); | ||
product.sku = productContent.sku; | ||
product.isExclusive = !!productContent.isExclusive; | ||
product.isExclusive = isTrue(productContent.isExclusive); | ||
@@ -61,0 +61,0 @@ if (productContent.contents) { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
63
92690
2258
+ Added@nuskin/ns-common-lib@1.3.0(transitive)
- Removed@nuskin/ns-common-lib@1.2.3(transitive)
Updated@nuskin/ns-common-lib@1.3.0