@ikas/storefront-model-functions 4.2.0-alpha.1 → 4.2.0-beta.1

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.
@@ -3,3 +3,4 @@ export declare function getPriceWithQuantity(item: IkasOrderLineItem): number;
3
3
  export declare function getOverridenPriceWithQuantity(item: IkasOrderLineItem): number;
4
4
  export declare function getFinalPriceWithQuantity(item: IkasOrderLineItem): number;
5
5
  export declare function getTax(item: IkasOrderLineItem): number;
6
+ export declare function hasDiscount(item: IkasOrderLineItem): boolean;
@@ -1 +1 @@
1
- function n(n){return n.price*n.quantity}function i(n){return n.price!==n.finalPrice?n.price*n.quantity:0}function r(n){var i;return(null!==(i=n.finalPrice)&&void 0!==i?i:n.price)*n.quantity}function t(n){var i=n.taxValue||0;return(n.finalPrice||0)*n.quantity/(100+i)*i}export{r as getFinalPriceWithQuantity,i as getOverridenPriceWithQuantity,n as getPriceWithQuantity,t as getTax};
1
+ function n(n){return n.price*n.quantity}function i(n){return n.price!==n.finalPrice?n.price*n.quantity:0}function r(n){var i;return(null!==(i=n.finalPrice)&&void 0!==i?i:n.price)*n.quantity}function t(n){var i=n.taxValue||0;return(n.finalPrice||0)*n.quantity/(100+i)*i}function u(n){return null!==n.discountPrice}export{r as getFinalPriceWithQuantity,i as getOverridenPriceWithQuantity,n as getPriceWithQuantity,t as getTax,u as hasDiscount};
@@ -2,3 +2,4 @@ export declare const validatePhoneNumber: (str: string) => boolean;
2
2
  export declare const stringToSlug: (str: string) => string;
3
3
  export declare function formatDate(date: Date): string;
4
4
  export declare const validateEmail: (str: string) => boolean;
5
+ export declare const validateByRegexString: (str: string, regexStr: string) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikas/storefront-model-functions",
3
- "version": "4.2.0-alpha.1",
3
+ "version": "4.2.0-beta.1",
4
4
  "description": "Functions for ikas storefront models.",
5
5
  "author": "ikas",
6
6
  "license": "ISC",
@@ -16,8 +16,8 @@
16
16
  "build": "rm -rf build && rollup -c"
17
17
  },
18
18
  "devDependencies": {
19
- "@ikas/storefront-config": "^4.2.0-alpha.1",
20
- "@ikas/storefront-models": "^4.2.0-alpha.1",
19
+ "@ikas/storefront-config": "^4.2.0-beta.1",
20
+ "@ikas/storefront-models": "^4.2.0-beta.1",
21
21
  "@rollup/plugin-node-resolve": "^13.3.0",
22
22
  "@rollup/plugin-commonjs": "^22.0.0",
23
23
  "rollup-plugin-rename-node-modules": "^1.2.0",
@@ -33,8 +33,8 @@
33
33
  "lodash": "^4.17.21"
34
34
  },
35
35
  "peerDependencies": {
36
- "@ikas/storefront-config": "^4.2.0-alpha.1",
37
- "@ikas/storefront-models": "^4.2.0-alpha.1",
36
+ "@ikas/storefront-config": "^4.2.0-beta.1",
37
+ "@ikas/storefront-models": "^4.2.0-beta.1",
38
38
  "lodash": "^4.17.21"
39
39
  }
40
40
  }