kcommons 6.1.7 → 6.1.9

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.
package/build/index.d.ts CHANGED
@@ -56,6 +56,7 @@ export * from "./constants/company.constants";
56
56
  export * from "./classes/asnWrapper.class";
57
57
  export * from "./utils/permission.utils";
58
58
  export * from "./utils/taxes.util";
59
+ export * from "./utils/parseQueryParams.util";
59
60
  export * from "./templates/notifications/rfq.notifications";
60
61
  export * from "./templates/notifications/po.notifications";
61
62
  export * from "./templates/notifications/quote.notifications";
package/build/index.js CHANGED
@@ -76,6 +76,7 @@ __exportStar(require("./classes/asnWrapper.class"), exports);
76
76
  // Utils
77
77
  __exportStar(require("./utils/permission.utils"), exports);
78
78
  __exportStar(require("./utils/taxes.util"), exports);
79
+ __exportStar(require("./utils/parseQueryParams.util"), exports);
79
80
  // Templates
80
81
  __exportStar(require("./templates/notifications/rfq.notifications"), exports);
81
82
  __exportStar(require("./templates/notifications/po.notifications"), exports);
@@ -0,0 +1 @@
1
+ export declare function parseQueryParams<T extends Record<string, any>>(path: string): T;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.parseQueryParams = parseQueryParams;
4
+ function parseQueryParams(path) {
5
+ const queries = path.split("?")[1];
6
+ const params = {};
7
+ if (!queries)
8
+ return params;
9
+ queries.split("&").forEach((element) => {
10
+ const [key, value] = element.split("=");
11
+ params[key] = value;
12
+ });
13
+ return params;
14
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kcommons",
3
- "version": "6.1.7",
3
+ "version": "6.1.9",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.js",