@wikicasa-dev/utilities 1.1.13 → 1.1.15

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function i(e,t){if(e)for(const n in e)t[n]=e[n]}const l=e=>!e||!Object.keys(e).length;function c(e){if(!e)return null;for(const t in e){const n=e[t];if(n&&(Array.isArray(n)||Object.keys(n).length>0))return JSON.parse(JSON.stringify(e))}return{...e}}const s=e=>Object.entries(e).reduce((t,[n,r])=>(t[r]=n,t),{}),u=e=>Object.keys(e).reduce((t,n)=>(t[n]=n,t),{}),O=e=>e??null,o=(e,t)=>e??t;exports.deepCopy=c;exports.getOrDefault=o;exports.getOrNull=O;exports.invertFlatObject=s;exports.invertKeyToValue=u;exports.isEmptyObject=l;exports.shallowCopyObjectTo=i;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function c(e,t){if(e)for(const r in e)t[r]=e[r]}const u=e=>!e||!Object.keys(e).length;function y(e){if(!e)return null;for(const t in e){const r=e[t];if(r&&(Array.isArray(r)||Object.keys(r).length>0))return JSON.parse(JSON.stringify(e))}return{...e}}const a=e=>Object.entries(e).reduce((t,[r,i])=>(t[i]=r,t),{}),f=e=>Object.keys(e).reduce((t,r)=>(t[r]=r,t),{}),O=e=>e??null,g=(e,t)=>e??t,l=(e={},t={})=>{if(e===null||t===null||e===void 0||t===void 0||typeof e!="object"&&typeof t!="object")return e===t;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(Array.isArray(e)&&Array.isArray(t))return e.length!==t.length?!1:e.every((n,s)=>l(n,t[s]));if(typeof e!=typeof t)return!1;const r=Object.keys(e),i=Object.keys(t);return r.length!==i.length?!1:r.every(n=>Object.prototype.hasOwnProperty.call(t,n)&&l(e[n],t[n]))};exports.areObjectsEqual=l;exports.deepCopy=y;exports.getOrDefault=g;exports.getOrNull=O;exports.invertFlatObject=a;exports.invertKeyToValue=f;exports.isEmptyObject=u;exports.shallowCopyObjectTo=c;
@@ -1,31 +1,47 @@
1
- function i(t, e) {
2
- if (t)
3
- for (const n in t)
4
- e[n] = t[n];
1
+ function l(e, t) {
2
+ if (e)
3
+ for (const r in e)
4
+ t[r] = e[r];
5
5
  }
6
- const s = (t) => !t || !Object.keys(t).length;
7
- function c(t) {
8
- if (!t) return null;
9
- for (const e in t) {
10
- const n = t[e];
11
- if (n && (Array.isArray(n) || Object.keys(n).length > 0))
12
- return JSON.parse(JSON.stringify(t));
6
+ const u = (e) => !e || !Object.keys(e).length;
7
+ function f(e) {
8
+ if (!e) return null;
9
+ for (const t in e) {
10
+ const r = e[t];
11
+ if (r && (Array.isArray(r) || Object.keys(r).length > 0))
12
+ return JSON.parse(JSON.stringify(e));
13
13
  }
14
- return { ...t };
14
+ return { ...e };
15
15
  }
16
- const u = (t) => Object.entries(t).reduce(
17
- (e, [n, r]) => (e[r] = n, e),
16
+ const y = (e) => Object.entries(e).reduce(
17
+ (t, [r, s]) => (t[s] = r, t),
18
18
  {}
19
- ), l = (t) => Object.keys(t).reduce(
20
- (e, n) => (e[n] = n, e),
19
+ ), a = (e) => Object.keys(e).reduce(
20
+ (t, r) => (t[r] = r, t),
21
21
  {}
22
- ), O = (t) => t ?? null, f = (t, e) => t ?? e;
22
+ ), O = (e) => e ?? null, g = (e, t) => e ?? t, i = (e = {}, t = {}) => {
23
+ if (e === null || t === null || e === void 0 || t === void 0 || typeof e != "object" && typeof t != "object")
24
+ return e === t;
25
+ if (e instanceof Date && t instanceof Date)
26
+ return e.getTime() === t.getTime();
27
+ if (Array.isArray(e) && Array.isArray(t))
28
+ return e.length !== t.length ? !1 : e.every((n, c) => i(n, t[c]));
29
+ if (typeof e != typeof t) return !1;
30
+ const r = Object.keys(e), s = Object.keys(t);
31
+ return r.length !== s.length ? !1 : r.every(
32
+ (n) => Object.prototype.hasOwnProperty.call(t, n) && i(
33
+ e[n],
34
+ t[n]
35
+ )
36
+ );
37
+ };
23
38
  export {
24
- c as deepCopy,
25
- f as getOrDefault,
39
+ i as areObjectsEqual,
40
+ f as deepCopy,
41
+ g as getOrDefault,
26
42
  O as getOrNull,
27
- u as invertFlatObject,
28
- l as invertKeyToValue,
29
- s as isEmptyObject,
30
- i as shallowCopyObjectTo
43
+ y as invertFlatObject,
44
+ a as invertKeyToValue,
45
+ u as isEmptyObject,
46
+ l as shallowCopyObjectTo
31
47
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("./types-BWBYhYYs.cjs");function l(i,p,t,o,r,e,f){let n="/";return t&&(n+=t+"-"),n+=`${p}/`,e&&(n+=`${e}/`),i&&(n+=`${i.replace(/^-+|-+$/g,"")}/`),o&&(n+=`${o.replace(/^_+|_+$/g,"")}/`),!o&&f&&(n+=`${f.replace(/^_+|_+$/g,"")}/`),r&&(n+=`${r.replace(/^_+|_+$/g,"")}/`),n}function a(i,p=!1){const t=p?{...$.ie}:{...$.Ce},o=Object.entries(i).filter(([r,e])=>t[r]&&e!=null).flatMap(([r,e])=>Array.isArray(e)?e.map(f=>`${encodeURIComponent(t[r])}=${encodeURIComponent(f)}`):e!=null?`${encodeURIComponent(t[r])}=${e instanceof Date?encodeURIComponent(e.toISOString()):encodeURIComponent(e)}`:[]).join("&");return o?`?${o}`:""}exports.buildParams=a;exports.buildURL=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const $=require("./types-BWBYhYYs.cjs");function s(i,p,t,o,r,e,f){let n="/";return t&&(n+=t+"-"),n+=`${p}/`,e&&(n+=`${e}/`),i&&(n+=`${i.replace(/^-+|-+$/g,"")}/`),o&&(n+=`${o.replace(/^_+|_+$/g,"")}/`),!o&&f&&(n+=`${f.replace(/^_+|_+$/g,"")}/`),r&&(n+=`${r.replace(/^_+|_+$/g,"")}/`),n}function c(i,p=!1){const t=p?{...$.ie}:{...$.Ce},o=Object.entries(i).filter(([r,e])=>t[r]&&e!==void 0&&e!==null&&e!==!1&&e!=="").flatMap(([r,e])=>Array.isArray(e)?e.map(f=>`${encodeURIComponent(t[r])}=${encodeURIComponent(f)}`):e!=null?`${encodeURIComponent(t[r])}=${e instanceof Date?encodeURIComponent(e.toISOString()):encodeURIComponent(e)}`:[]).join("&");return o?`?${o}`:""}exports.buildParams=c;exports.buildURL=s;
@@ -1,15 +1,17 @@
1
- import { i as $, C as a } from "./types-Cjj_nH6d.js";
2
- function s(i, p, o, t, r, e, f) {
1
+ import { i as $, C as m } from "./types-Cjj_nH6d.js";
2
+ function a(i, p, o, t, r, e, f) {
3
3
  let n = "/";
4
4
  return o && (n += o + "-"), n += `${p}/`, e && (n += `${e}/`), i && (n += `${i.replace(/^-+|-+$/g, "")}/`), t && (n += `${t.replace(/^_+|_+$/g, "")}/`), !t && f && (n += `${f.replace(/^_+|_+$/g, "")}/`), r && (n += `${r.replace(/^_+|_+$/g, "")}/`), n;
5
5
  }
6
6
  function c(i, p = !1) {
7
- const o = p ? { ...$ } : { ...a }, t = Object.entries(i).filter(([r, e]) => o[r] && e != null).flatMap(([r, e]) => Array.isArray(e) ? e.map(
7
+ const o = p ? { ...$ } : { ...m }, t = Object.entries(i).filter(
8
+ ([r, e]) => o[r] && e !== void 0 && e !== null && e !== !1 && e !== ""
9
+ ).flatMap(([r, e]) => Array.isArray(e) ? e.map(
8
10
  (f) => `${encodeURIComponent(o[r])}=${encodeURIComponent(f)}`
9
11
  ) : e != null ? `${encodeURIComponent(o[r])}=${e instanceof Date ? encodeURIComponent(e.toISOString()) : encodeURIComponent(e)}` : []).join("&");
10
12
  return t ? `?${t}` : "";
11
13
  }
12
14
  export {
13
15
  c as buildParams,
14
- s as buildURL
16
+ a as buildURL
15
17
  };
package/dist/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./ArrayUtils.cjs"),C=require("./ColorUtils.cjs"),a=require("./CookieUtils.cjs"),c=require("./CurrencyUtils.cjs"),n=require("./DateUtils.cjs"),s=require("./DeviceDetectionUtils.cjs"),l=require("./DOMUtils.cjs"),u=require("./EmailUtils.cjs"),E=require("./FunctionUtils.cjs"),m=require("./GenericUtils.cjs"),t=require("./NumberUtils.cjs"),r=require("./ObjectUtils.cjs"),S=require("./ObserverUtils.cjs"),d=require("./PermissionUtils.cjs"),g=require("./RESB_UrlBuilder.cjs"),o=require("./StringUtils.cjs"),y=require("./URLBuilderUtils.cjs"),e=require("./RegexUtils.cjs"),b=require("./GeolocationUtils.cjs"),O=require("./AdressUtils.cjs"),f=require("./GAutocompleteUtils.cjs"),P=require("./DownloadUtils.cjs"),i=require("./MapUtils.cjs");exports.isArrNullOrEmpty=p.isArrNullOrEmpty;exports.rgba=C.rgba;exports.decodeCookie=a.decodeCookie;exports.encodeCookie=a.encodeCookie;exports.getCookie=a.getCookie;exports.removeCookie=a.removeCookie;exports.formatCurrency=c.formatCurrency;exports.formatCurrencyShort=c.formatCurrencyShort;exports.formatDate=n.formatDate;exports.formatDateToddMMYYYY=n.formatDateToddMMYYYY;exports.getStartAndEndOfDayUTC=n.getStartAndEndOfDayUTC;exports.subtractDaysFromDate=n.subtractDaysFromDate;exports.getCurrentDeviceSize=s.getCurrentDeviceSize;exports.isMobile=s.isMobile;exports.isSafari=s.isSafari;exports.isWindows=s.isWindows;exports.isiOSDevice=s.isiOSDevice;exports.emptyElem=l.emptyElem;exports.getSingleElement=l.getSingleElement;exports.hideElem=l.hideElem;exports.showElem=l.showElem;exports.hash256=u.hash256;exports.hashEmail=u.hashEmail;exports.debounce=E.debounce;exports.isPromise=E.isPromise;exports.awaitableSetTimeout=m.awaitableSetTimeout;exports.createCustomEvent=m.createCustomEvent;exports.formatFloat=t.formatFloat;exports.formatInteger=t.formatInteger;exports.formatLocaleNumber=t.formatLocaleNumber;exports.formatLocaleNumberAuto=t.formatLocaleNumberAuto;exports.formatNumber=t.formatNumber;exports.formatterNumberObj=t.formatterNumberObj;exports.parseLocaleNumber=t.parseLocaleNumber;exports.parseLocaleNumberAuto=t.parseLocaleNumberAuto;exports.deepCopy=r.deepCopy;exports.getOrDefault=r.getOrDefault;exports.getOrNull=r.getOrNull;exports.invertFlatObject=r.invertFlatObject;exports.invertKeyToValue=r.invertKeyToValue;exports.isEmptyObject=r.isEmptyObject;exports.shallowCopyObjectTo=r.shallowCopyObjectTo;exports.observeOnce=S.observeOnce;exports.addPermissionStateListener=d.addPermissionStateListener;exports.onNotificationsPermissionChange=d.onNotificationsPermissionChange;exports.buildParams=g.buildParams;exports.buildURL=g.buildURL;exports.capitalizeFirstLetter=o.capitalizeFirstLetter;exports.cleanASCII=o.cleanASCII;exports.decodeTextWithEntities=o.decodeTextWithEntities;exports.replaceAll=o.replaceAll;exports.replaceAllTokens=o.replaceAllTokens;exports.stringToHyphened=o.stringToHyphened;exports.strip=o.strip;exports.appendQueryString=y.appendQueryString;exports.COMPETITOR_REGEX=e.COMPETITOR_REGEX;exports.DATE_REGEX=e.DATE_REGEX;exports.EMAIL_REGEX=e.EMAIL_REGEX;exports.EMAIL_REGEX_INTO_TEXT=e.EMAIL_REGEX_INTO_TEXT;exports.EXCLUDED_REGEX=e.EXCLUDED_REGEX;exports.GLOBAL_PHONE_REGEX=e.GLOBAL_PHONE_REGEX;exports.PASSWORD_REGEX=e.PASSWORD_REGEX;exports.PHONE_REGEX=e.PHONE_REGEX;exports.ROOMS_REGEX=e.ROOMS_REGEX;exports.SQM_REGEX=e.SQM_REGEX;exports.browserSupportGeolocation=b.browserSupportGeolocation;exports.getUserPosition=b.getUserPosition;exports.formatAddress=O.formatAddress;exports.formattedAddress=O.formattedAddress;exports.googlePlaceConverter=f.googlePlaceConverter;exports.downloadFile=P.downloadFile;exports.calcPolygonCenter=i.calcPolygonCenter;exports.encodePolygon=i.encodePolygon;exports.getMinMaxLatLng=i.getMinMaxLatLng;exports.getPolygonString=i.getPolygonString;exports.parsePoints=i.parsePoints;exports.removeDuplicatePoints=i.removeDuplicatePoints;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./ArrayUtils.cjs"),C=require("./ColorUtils.cjs"),a=require("./CookieUtils.cjs"),c=require("./CurrencyUtils.cjs"),l=require("./DateUtils.cjs"),s=require("./DeviceDetectionUtils.cjs"),n=require("./DOMUtils.cjs"),u=require("./EmailUtils.cjs"),E=require("./FunctionUtils.cjs"),m=require("./GenericUtils.cjs"),t=require("./NumberUtils.cjs"),r=require("./ObjectUtils.cjs"),S=require("./ObserverUtils.cjs"),d=require("./PermissionUtils.cjs"),g=require("./RESB_UrlBuilder.cjs"),o=require("./StringUtils.cjs"),y=require("./URLBuilderUtils.cjs"),e=require("./RegexUtils.cjs"),b=require("./GeolocationUtils.cjs"),O=require("./AdressUtils.cjs"),f=require("./GAutocompleteUtils.cjs"),P=require("./DownloadUtils.cjs"),i=require("./MapUtils.cjs");exports.isArrNullOrEmpty=p.isArrNullOrEmpty;exports.rgba=C.rgba;exports.decodeCookie=a.decodeCookie;exports.encodeCookie=a.encodeCookie;exports.getCookie=a.getCookie;exports.removeCookie=a.removeCookie;exports.formatCurrency=c.formatCurrency;exports.formatCurrencyShort=c.formatCurrencyShort;exports.formatDate=l.formatDate;exports.formatDateToddMMYYYY=l.formatDateToddMMYYYY;exports.getStartAndEndOfDayUTC=l.getStartAndEndOfDayUTC;exports.subtractDaysFromDate=l.subtractDaysFromDate;exports.getCurrentDeviceSize=s.getCurrentDeviceSize;exports.isMobile=s.isMobile;exports.isSafari=s.isSafari;exports.isWindows=s.isWindows;exports.isiOSDevice=s.isiOSDevice;exports.emptyElem=n.emptyElem;exports.getSingleElement=n.getSingleElement;exports.hideElem=n.hideElem;exports.showElem=n.showElem;exports.hash256=u.hash256;exports.hashEmail=u.hashEmail;exports.debounce=E.debounce;exports.isPromise=E.isPromise;exports.awaitableSetTimeout=m.awaitableSetTimeout;exports.createCustomEvent=m.createCustomEvent;exports.formatFloat=t.formatFloat;exports.formatInteger=t.formatInteger;exports.formatLocaleNumber=t.formatLocaleNumber;exports.formatLocaleNumberAuto=t.formatLocaleNumberAuto;exports.formatNumber=t.formatNumber;exports.formatterNumberObj=t.formatterNumberObj;exports.parseLocaleNumber=t.parseLocaleNumber;exports.parseLocaleNumberAuto=t.parseLocaleNumberAuto;exports.areObjectsEqual=r.areObjectsEqual;exports.deepCopy=r.deepCopy;exports.getOrDefault=r.getOrDefault;exports.getOrNull=r.getOrNull;exports.invertFlatObject=r.invertFlatObject;exports.invertKeyToValue=r.invertKeyToValue;exports.isEmptyObject=r.isEmptyObject;exports.shallowCopyObjectTo=r.shallowCopyObjectTo;exports.observeOnce=S.observeOnce;exports.addPermissionStateListener=d.addPermissionStateListener;exports.onNotificationsPermissionChange=d.onNotificationsPermissionChange;exports.buildParams=g.buildParams;exports.buildURL=g.buildURL;exports.capitalizeFirstLetter=o.capitalizeFirstLetter;exports.cleanASCII=o.cleanASCII;exports.decodeTextWithEntities=o.decodeTextWithEntities;exports.replaceAll=o.replaceAll;exports.replaceAllTokens=o.replaceAllTokens;exports.stringToHyphened=o.stringToHyphened;exports.strip=o.strip;exports.appendQueryString=y.appendQueryString;exports.COMPETITOR_REGEX=e.COMPETITOR_REGEX;exports.DATE_REGEX=e.DATE_REGEX;exports.EMAIL_REGEX=e.EMAIL_REGEX;exports.EMAIL_REGEX_INTO_TEXT=e.EMAIL_REGEX_INTO_TEXT;exports.EXCLUDED_REGEX=e.EXCLUDED_REGEX;exports.GLOBAL_PHONE_REGEX=e.GLOBAL_PHONE_REGEX;exports.PASSWORD_REGEX=e.PASSWORD_REGEX;exports.PHONE_REGEX=e.PHONE_REGEX;exports.ROOMS_REGEX=e.ROOMS_REGEX;exports.SQM_REGEX=e.SQM_REGEX;exports.browserSupportGeolocation=b.browserSupportGeolocation;exports.getUserPosition=b.getUserPosition;exports.formatAddress=O.formatAddress;exports.formattedAddress=O.formattedAddress;exports.googlePlaceConverter=f.googlePlaceConverter;exports.downloadFile=P.downloadFile;exports.calcPolygonCenter=i.calcPolygonCenter;exports.encodePolygon=i.encodePolygon;exports.getMinMaxLatLng=i.getMinMaxLatLng;exports.getPolygonString=i.getPolygonString;exports.parsePoints=i.parsePoints;exports.removeDuplicatePoints=i.removeDuplicatePoints;
package/dist/index.js CHANGED
@@ -1,102 +1,103 @@
1
1
  import { isArrNullOrEmpty as r } from "./ArrayUtils.js";
2
2
  import { rgba as a } from "./ColorUtils.js";
3
3
  import { decodeCookie as i, encodeCookie as l, getCookie as n, removeCookie as p } from "./CookieUtils.js";
4
- import { formatCurrency as f, formatCurrencyShort as E } from "./CurrencyUtils.js";
5
- import { formatDate as d, formatDateToddMMYYYY as x, getStartAndEndOfDayUTC as u, subtractDaysFromDate as g } from "./DateUtils.js";
4
+ import { formatCurrency as E, formatCurrencyShort as f } from "./CurrencyUtils.js";
5
+ import { formatDate as d, formatDateToddMMYYYY as u, getStartAndEndOfDayUTC as x, subtractDaysFromDate as g } from "./DateUtils.js";
6
6
  import { getCurrentDeviceSize as O, isMobile as C, isSafari as S, isWindows as y, isiOSDevice as P } from "./DeviceDetectionUtils.js";
7
7
  import { emptyElem as L, getSingleElement as R, hideElem as T, showElem as D } from "./DOMUtils.js";
8
8
  import { hash256 as G, hashEmail as N } from "./EmailUtils.js";
9
9
  import { debounce as h, isPromise as M } from "./FunctionUtils.js";
10
10
  import { awaitableSetTimeout as I, createCustomEvent as w } from "./GenericUtils.js";
11
- import { formatFloat as F, formatInteger as j, formatLocaleNumber as U, formatLocaleNumberAuto as Y, formatNumber as H, formatterNumberObj as W, parseLocaleNumber as z, parseLocaleNumberAuto as Q } from "./NumberUtils.js";
12
- import { deepCopy as K, getOrDefault as V, getOrNull as q, invertFlatObject as J, invertKeyToValue as Z, isEmptyObject as $, shallowCopyObjectTo as ee } from "./ObjectUtils.js";
13
- import { observeOnce as re } from "./ObserverUtils.js";
14
- import { addPermissionStateListener as ae, onNotificationsPermissionChange as me } from "./PermissionUtils.js";
15
- import { buildParams as le, buildURL as ne } from "./RESB_UrlBuilder.js";
16
- import { capitalizeFirstLetter as se, cleanASCII as fe, decodeTextWithEntities as Ee, replaceAll as ce, replaceAllTokens as de, stringToHyphened as xe, strip as ue } from "./StringUtils.js";
17
- import { appendQueryString as be } from "./URLBuilderUtils.js";
18
- import { COMPETITOR_REGEX as Ce, DATE_REGEX as Se, EMAIL_REGEX as ye, EMAIL_REGEX_INTO_TEXT as Pe, EXCLUDED_REGEX as Ae, GLOBAL_PHONE_REGEX as Le, PASSWORD_REGEX as Re, PHONE_REGEX as Te, ROOMS_REGEX as De, SQM_REGEX as _e } from "./RegexUtils.js";
19
- import { browserSupportGeolocation as Ne, getUserPosition as Xe } from "./GeolocationUtils.js";
20
- import { formatAddress as Me, formattedAddress as ve } from "./AdressUtils.js";
21
- import { googlePlaceConverter as we } from "./GAutocompleteUtils.js";
11
+ import { formatFloat as k, formatInteger as F, formatLocaleNumber as U, formatLocaleNumberAuto as Y, formatNumber as H, formatterNumberObj as W, parseLocaleNumber as z, parseLocaleNumberAuto as Q } from "./NumberUtils.js";
12
+ import { areObjectsEqual as B, deepCopy as K, getOrDefault as V, getOrNull as J, invertFlatObject as Z, invertKeyToValue as $, isEmptyObject as ee, shallowCopyObjectTo as oe } from "./ObjectUtils.js";
13
+ import { observeOnce as te } from "./ObserverUtils.js";
14
+ import { addPermissionStateListener as me, onNotificationsPermissionChange as ie } from "./PermissionUtils.js";
15
+ import { buildParams as ne, buildURL as pe } from "./RESB_UrlBuilder.js";
16
+ import { capitalizeFirstLetter as Ee, cleanASCII as fe, decodeTextWithEntities as ce, replaceAll as de, replaceAllTokens as ue, stringToHyphened as xe, strip as ge } from "./StringUtils.js";
17
+ import { appendQueryString as Oe } from "./URLBuilderUtils.js";
18
+ import { COMPETITOR_REGEX as Se, DATE_REGEX as ye, EMAIL_REGEX as Pe, EMAIL_REGEX_INTO_TEXT as Ae, EXCLUDED_REGEX as Le, GLOBAL_PHONE_REGEX as Re, PASSWORD_REGEX as Te, PHONE_REGEX as De, ROOMS_REGEX as _e, SQM_REGEX as Ge } from "./RegexUtils.js";
19
+ import { browserSupportGeolocation as Xe, getUserPosition as he } from "./GeolocationUtils.js";
20
+ import { formatAddress as ve, formattedAddress as Ie } from "./AdressUtils.js";
21
+ import { googlePlaceConverter as je } from "./GAutocompleteUtils.js";
22
22
  import { downloadFile as Fe } from "./DownloadUtils.js";
23
- import { calcPolygonCenter as Ue, encodePolygon as Ye, getMinMaxLatLng as He, getPolygonString as We, parsePoints as ze, removeDuplicatePoints as Qe } from "./MapUtils.js";
23
+ import { calcPolygonCenter as Ye, encodePolygon as He, getMinMaxLatLng as We, getPolygonString as ze, parsePoints as Qe, removeDuplicatePoints as qe } from "./MapUtils.js";
24
24
  export {
25
- Ce as COMPETITOR_REGEX,
26
- Se as DATE_REGEX,
27
- ye as EMAIL_REGEX,
28
- Pe as EMAIL_REGEX_INTO_TEXT,
29
- Ae as EXCLUDED_REGEX,
30
- Le as GLOBAL_PHONE_REGEX,
31
- Re as PASSWORD_REGEX,
32
- Te as PHONE_REGEX,
33
- De as ROOMS_REGEX,
34
- _e as SQM_REGEX,
35
- ae as addPermissionStateListener,
36
- be as appendQueryString,
25
+ Se as COMPETITOR_REGEX,
26
+ ye as DATE_REGEX,
27
+ Pe as EMAIL_REGEX,
28
+ Ae as EMAIL_REGEX_INTO_TEXT,
29
+ Le as EXCLUDED_REGEX,
30
+ Re as GLOBAL_PHONE_REGEX,
31
+ Te as PASSWORD_REGEX,
32
+ De as PHONE_REGEX,
33
+ _e as ROOMS_REGEX,
34
+ Ge as SQM_REGEX,
35
+ me as addPermissionStateListener,
36
+ Oe as appendQueryString,
37
+ B as areObjectsEqual,
37
38
  I as awaitableSetTimeout,
38
- Ne as browserSupportGeolocation,
39
- le as buildParams,
40
- ne as buildURL,
41
- Ue as calcPolygonCenter,
42
- se as capitalizeFirstLetter,
39
+ Xe as browserSupportGeolocation,
40
+ ne as buildParams,
41
+ pe as buildURL,
42
+ Ye as calcPolygonCenter,
43
+ Ee as capitalizeFirstLetter,
43
44
  fe as cleanASCII,
44
45
  w as createCustomEvent,
45
46
  h as debounce,
46
47
  i as decodeCookie,
47
- Ee as decodeTextWithEntities,
48
+ ce as decodeTextWithEntities,
48
49
  K as deepCopy,
49
50
  Fe as downloadFile,
50
51
  L as emptyElem,
51
52
  l as encodeCookie,
52
- Ye as encodePolygon,
53
- Me as formatAddress,
54
- f as formatCurrency,
55
- E as formatCurrencyShort,
53
+ He as encodePolygon,
54
+ ve as formatAddress,
55
+ E as formatCurrency,
56
+ f as formatCurrencyShort,
56
57
  d as formatDate,
57
- x as formatDateToddMMYYYY,
58
- F as formatFloat,
59
- j as formatInteger,
58
+ u as formatDateToddMMYYYY,
59
+ k as formatFloat,
60
+ F as formatInteger,
60
61
  U as formatLocaleNumber,
61
62
  Y as formatLocaleNumberAuto,
62
63
  H as formatNumber,
63
- ve as formattedAddress,
64
+ Ie as formattedAddress,
64
65
  W as formatterNumberObj,
65
66
  n as getCookie,
66
67
  O as getCurrentDeviceSize,
67
- He as getMinMaxLatLng,
68
+ We as getMinMaxLatLng,
68
69
  V as getOrDefault,
69
- q as getOrNull,
70
- We as getPolygonString,
70
+ J as getOrNull,
71
+ ze as getPolygonString,
71
72
  R as getSingleElement,
72
- u as getStartAndEndOfDayUTC,
73
- Xe as getUserPosition,
74
- we as googlePlaceConverter,
73
+ x as getStartAndEndOfDayUTC,
74
+ he as getUserPosition,
75
+ je as googlePlaceConverter,
75
76
  G as hash256,
76
77
  N as hashEmail,
77
78
  T as hideElem,
78
- J as invertFlatObject,
79
- Z as invertKeyToValue,
79
+ Z as invertFlatObject,
80
+ $ as invertKeyToValue,
80
81
  r as isArrNullOrEmpty,
81
- $ as isEmptyObject,
82
+ ee as isEmptyObject,
82
83
  C as isMobile,
83
84
  M as isPromise,
84
85
  S as isSafari,
85
86
  y as isWindows,
86
87
  P as isiOSDevice,
87
- re as observeOnce,
88
- me as onNotificationsPermissionChange,
88
+ te as observeOnce,
89
+ ie as onNotificationsPermissionChange,
89
90
  z as parseLocaleNumber,
90
91
  Q as parseLocaleNumberAuto,
91
- ze as parsePoints,
92
+ Qe as parsePoints,
92
93
  p as removeCookie,
93
- Qe as removeDuplicatePoints,
94
- ce as replaceAll,
95
- de as replaceAllTokens,
94
+ qe as removeDuplicatePoints,
95
+ de as replaceAll,
96
+ ue as replaceAllTokens,
96
97
  a as rgba,
97
- ee as shallowCopyObjectTo,
98
+ oe as shallowCopyObjectTo,
98
99
  D as showElem,
99
100
  xe as stringToHyphened,
100
- ue as strip,
101
+ ge as strip,
101
102
  g as subtractDaysFromDate
102
103
  };
@@ -48,3 +48,14 @@ export declare const getOrNull: <T>(v: T) => NonNullable<T> | null;
48
48
  * @returns The value if it is not null or undefined, otherwise returns the default value.
49
49
  */
50
50
  export declare const getOrDefault: <T>(value: T, defaultValue: NonNullable<T>) => NonNullable<T>;
51
+ /**
52
+ * Compares two objects for deep equality.
53
+ *
54
+ * This function performs a deep comparison between two objects, checking if they have the same properties with the same values.
55
+ * It can handle various data types including null, undefined, primitive types, Date objects, and Arrays.
56
+ *
57
+ * @param obj1 - First object to compare. Defaults to an empty object.
58
+ * @param obj2 - Second object to compare. Defaults to an empty object.
59
+ * @returns Returns true if the objects are deeply equal, false otherwise.
60
+ */
61
+ export declare const areObjectsEqual: (obj1?: object, obj2?: object) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wikicasa-dev/utilities",
3
- "version": "1.1.13",
3
+ "version": "1.1.15",
4
4
  "description": "Wikicasa frontend utilities",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",