@epcc-sdk/sdks-shopper 0.0.29 → 0.0.30

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.
@@ -22,8 +22,8 @@ __export(get_cart_id_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(get_cart_id_exports);
24
24
  var import_initialize_cart = require('./initialize-cart.cjs');
25
- function getCartId() {
26
- return localStorage.getItem(import_initialize_cart.PERSISTED_CART_STORAGE_KEY);
25
+ function getCartId(options) {
26
+ return localStorage.getItem(options?.storageKey ?? import_initialize_cart.PERSISTED_CART_STORAGE_KEY);
27
27
  }
28
28
  // Annotate the CommonJS export names for ESM import in node:
29
29
  0 && (module.exports = {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/get-cart-id.ts"],"sourcesContent":["import { PERSISTED_CART_STORAGE_KEY } from \"./initialize-cart\"\n\nexport function getCartId() {\n return localStorage.getItem(PERSISTED_CART_STORAGE_KEY)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAA2C;AAEpC,SAAS,YAAY;AAC1B,SAAO,aAAa,QAAQ,iDAA0B;AACxD;","names":[]}
1
+ {"version":3,"sources":["../../src/utils/get-cart-id.ts"],"sourcesContent":["import { PERSISTED_CART_STORAGE_KEY } from \"./initialize-cart\"\n\nexport function getCartId(options?: { storageKey?: string }) {\n return localStorage.getItem(options?.storageKey ?? PERSISTED_CART_STORAGE_KEY)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAA2C;AAEpC,SAAS,UAAU,SAAmC;AAC3D,SAAO,aAAa,QAAQ,SAAS,cAAc,iDAA0B;AAC/E;","names":[]}
@@ -1,3 +1,5 @@
1
- declare function getCartId(): string | null;
1
+ declare function getCartId(options?: {
2
+ storageKey?: string;
3
+ }): string | null;
2
4
 
3
5
  export { getCartId };
@@ -1,3 +1,5 @@
1
- declare function getCartId(): string | null;
1
+ declare function getCartId(options?: {
2
+ storageKey?: string;
3
+ }): string | null;
2
4
 
3
5
  export { getCartId };
@@ -1,6 +1,6 @@
1
1
  import { PERSISTED_CART_STORAGE_KEY } from "./initialize-cart.mjs";
2
- function getCartId() {
3
- return localStorage.getItem(PERSISTED_CART_STORAGE_KEY);
2
+ function getCartId(options) {
3
+ return localStorage.getItem(options?.storageKey ?? PERSISTED_CART_STORAGE_KEY);
4
4
  }
5
5
  export {
6
6
  getCartId
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/utils/get-cart-id.ts"],"sourcesContent":["import { PERSISTED_CART_STORAGE_KEY } from \"./initialize-cart\"\n\nexport function getCartId() {\n return localStorage.getItem(PERSISTED_CART_STORAGE_KEY)\n}\n"],"mappings":"AAAA,SAAS,kCAAkC;AAEpC,SAAS,YAAY;AAC1B,SAAO,aAAa,QAAQ,0BAA0B;AACxD;","names":[]}
1
+ {"version":3,"sources":["../../src/utils/get-cart-id.ts"],"sourcesContent":["import { PERSISTED_CART_STORAGE_KEY } from \"./initialize-cart\"\n\nexport function getCartId(options?: { storageKey?: string }) {\n return localStorage.getItem(options?.storageKey ?? PERSISTED_CART_STORAGE_KEY)\n}\n"],"mappings":"AAAA,SAAS,kCAAkC;AAEpC,SAAS,UAAU,SAAmC;AAC3D,SAAO,aAAa,QAAQ,SAAS,cAAc,0BAA0B;AAC/E;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epcc-sdk/sdks-shopper",
3
- "version": "0.0.29",
3
+ "version": "0.0.30",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",