@nuskin/cs-product-lib 1.0.27-cx12-8926.2 → 1.0.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/formatKit.js +5 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nuskin/cs-product-lib",
3
- "version": "1.0.27-cx12-8926.2",
3
+ "version": "1.0.27",
4
4
  "description": "Library for pulling and parsing product content (and applying business logic) retrieved from Contentstack",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
package/src/formatKit.js CHANGED
@@ -1,4 +1,4 @@
1
- const { isNullOrEmpty } = require('@nuskin/ns-common-lib')
1
+ const { isNullOrEmpty, isTrue } = require('@nuskin/ns-common-lib')
2
2
  const moment = require('moment')
3
3
 
4
4
  const parseStatus = (variant) => {
@@ -192,11 +192,11 @@ const parseKit = (product, market) => {
192
192
  kits.title = properties?.title
193
193
  kits.description = properties?.description
194
194
  kits.availableChannels = properties?.availableChannels
195
- kits.chargeShipping = !!properties?.chargeShipping
195
+ kits.chargeShipping = isTrue(properties?.chargeShipping)
196
196
  kits.customerTypes = properties?.customerTypes
197
- kits.dangerousGoods = !!properties?.dangerousGoods
198
- kits.excludeFromSearch = !!properties?.excludeFromSearch
199
- kits.isExclusive = !!properties?.isExclusive
197
+ kits.dangerousGoods = isTrue(properties?.dangerousGoods)
198
+ kits.excludeFromSearch = isTrue(properties?.excludeFromSearch)
199
+ kits.isExclusive = isTrue(properties?.isExclusive)
200
200
  kits.marketAttributes = properties?.marketAttributes
201
201
  kits.maxQuantity = (product?.inventoryProperties || {}).atpQty
202
202
  const priceData = parsePrice(product)