saloe 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.
@@ -263,7 +263,7 @@ if (!("cookies" in ServiceWorkerRegistration.prototype)) {
263
263
  });
264
264
  }
265
265
  const cookieStore = Object.create(CookieStore.prototype);
266
- self.cookieStore = (self == null ? void 0 : self.cookieStore) ?? cookieStore;
266
+ if (!self.cookieStore) self.cookieStore = cookieStore;
267
267
  const setCookie = ({ key, value, config }) => {
268
268
  var _a;
269
269
  return (_a = self.cookieStore) == null ? void 0 : _a.set(key, value, config);
package/dist/cookie.es.js CHANGED
@@ -261,7 +261,7 @@ if (!("cookies" in ServiceWorkerRegistration.prototype)) {
261
261
  });
262
262
  }
263
263
  const cookieStore = Object.create(CookieStore.prototype);
264
- self.cookieStore = (self == null ? void 0 : self.cookieStore) ?? cookieStore;
264
+ if (!self.cookieStore) self.cookieStore = cookieStore;
265
265
  const setCookie = ({ key, value, config }) => {
266
266
  var _a;
267
267
  return (_a = self.cookieStore) == null ? void 0 : _a.set(key, value, config);
@@ -18,6 +18,6 @@ function _interopNamespaceDefault(e) {
18
18
  return Object.freeze(n);
19
19
  }
20
20
  const URLPatternPolyfill__namespace = /* @__PURE__ */ _interopNamespaceDefault(URLPatternPolyfill);
21
- self.URLPattern = (self == null ? void 0 : self.URLPattern) ?? URLPatternPolyfill__namespace.URLPattern;
21
+ if (!self.URLPattern) self.URLPattern = URLPatternPolyfill__namespace.URLPattern;
22
22
  const getURLPatern = ({ pathname }) => new self.URLPattern({ pathname });
23
23
  exports.getURLPatern = getURLPatern;
@@ -1,5 +1,5 @@
1
1
  import * as URLPatternPolyfill from "urlpattern-polyfill";
2
- self.URLPattern = (self == null ? void 0 : self.URLPattern) ?? URLPatternPolyfill.URLPattern;
2
+ if (!self.URLPattern) self.URLPattern = URLPatternPolyfill.URLPattern;
3
3
  const getURLPatern = ({ pathname }) => new self.URLPattern({ pathname });
4
4
  export {
5
5
  getURLPatern
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "saloe",
3
- "version": "0.0.29",
3
+ "version": "0.0.30",
4
4
  "description": "Tools for making web development easy and efficient",
5
5
  "type": "module",
6
6
  "scripts": {
package/src/cookie.js CHANGED
@@ -1,7 +1,7 @@
1
- import { cookieStore } from 'cookie-store'
1
+ import * as CookieStorePolyfill from 'cookie-store'
2
2
 
3
3
 
4
- self.cookieStore = self?.cookieStore ?? cookieStore
4
+ if (!self.cookieStore) self.cookieStore = CookieStorePolyfill.cookieStore
5
5
 
6
6
  const setCookie = ({ key, value, config }) => {
7
7
  return self.cookieStore?.set(key, value, config)
package/src/urlpattern.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as URLPatternPolyfill from 'urlpattern-polyfill'
2
2
 
3
3
 
4
- self.URLPattern = self?.URLPattern ?? URLPatternPolyfill.URLPattern
4
+ if (!self.URLPattern ) self.URLPattern = URLPatternPolyfill.URLPattern
5
5
 
6
6
  const getURLPatern = ({ pathname }) => new self.URLPattern({ pathname })
7
7