utilzify 1.0.2 → 1.0.3

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
- var apizum=function(t){"use strict";var r="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var n=Array.isArray,o="object"==typeof r&&r&&r.Object===Object&&r,a="object"==typeof self&&self&&self.Object===Object&&self,i=o||a||Function("return this")(),u=i.Symbol,c=u,s=Object.prototype,l=s.hasOwnProperty,f=s.toString,p=c?c.toStringTag:void 0;var h=function(t){var r=l.call(t,p),e=t[p];try{t[p]=void 0;var n=!0}catch(t){}var o=f.call(t);return n&&(r?t[p]=e:delete t[p]),o},v=Object.prototype.toString;var y=h,d=function(t){return v.call(t)},_=u?u.toStringTag:void 0;var g=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":_&&_ in Object(t)?y(t):d(t)};var m=g,b=function(t){return null!=t&&"object"==typeof t};var j=function(t){return"symbol"==typeof t||b(t)&&"[object Symbol]"==m(t)},S=n,N=j,O=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,w=/^\w*$/;var C=function(t,r){if(S(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!N(t))||(w.test(t)||!O.test(t)||null!=r&&t in Object(r))};var $=function(t){var r=typeof t;return null!=t&&("object"==r||"function"==r)},A=g,z=$;var x,P=function(t){if(!z(t))return!1;var r=A(t);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r},M=i["__core-js_shared__"],T=(x=/[^.]+$/.exec(M&&M.keys&&M.keys.IE_PROTO||""))?"Symbol(src)_1."+x:"";var F=function(t){return!!T&&T in t},I=Function.prototype.toString;var E=P,B=F,k=$,L=function(t){if(null!=t){try{return I.call(t)}catch(t){}try{return t+""}catch(t){}}return""},U=/^\[object .+?Constructor\]$/,D=Function.prototype,G=Object.prototype,R=D.toString,V=G.hasOwnProperty,Z=RegExp("^"+R.call(V).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var q=function(t){return!(!k(t)||B(t))&&(E(t)?Z:U).test(L(t))},H=function(t,r){return null==t?void 0:t[r]};var J=function(t,r){var e=H(t,r);return q(e)?e:void 0},K=J(Object,"create"),Q=K;var W=function(){this.__data__=Q?Q(null):{},this.size=0};var X=function(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r},Y=K,tt=Object.prototype.hasOwnProperty;var rt=function(t){var r=this.__data__;if(Y){var e=r[t];return"__lodash_hash_undefined__"===e?void 0:e}return tt.call(r,t)?r[t]:void 0},et=K,nt=Object.prototype.hasOwnProperty;var ot=K;var at=W,it=X,ut=rt,ct=function(t){var r=this.__data__;return et?void 0!==r[t]:nt.call(r,t)},st=function(t,r){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=ot&&void 0===r?"__lodash_hash_undefined__":r,this};function lt(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}lt.prototype.clear=at,lt.prototype.delete=it,lt.prototype.get=ut,lt.prototype.has=ct,lt.prototype.set=st;var ft=lt;var pt=function(){this.__data__=[],this.size=0};var ht=function(t,r){return t===r||t!=t&&r!=r};var vt=function(t,r){for(var e=t.length;e--;)if(ht(t[e][0],r))return e;return-1},yt=vt,dt=Array.prototype.splice;var _t=vt;var gt=vt;var mt=vt;var bt=pt,jt=function(t){var r=this.__data__,e=yt(r,t);return!(e<0)&&(e==r.length-1?r.pop():dt.call(r,e,1),--this.size,!0)},St=function(t){var r=this.__data__,e=_t(r,t);return e<0?void 0:r[e][1]},Nt=function(t){return gt(this.__data__,t)>-1},Ot=function(t,r){var e=this.__data__,n=mt(e,t);return n<0?(++this.size,e.push([t,r])):e[n][1]=r,this};function wt(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}wt.prototype.clear=bt,wt.prototype.delete=jt,wt.prototype.get=St,wt.prototype.has=Nt,wt.prototype.set=Ot;var Ct=wt,$t=J(i,"Map"),At=ft,zt=Ct,xt=$t;var Pt=function(t){var r=typeof t;return"string"==r||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==t:null===t};var Mt=function(t,r){var e=t.__data__;return Pt(r)?e["string"==typeof r?"string":"hash"]:e.map},Tt=Mt;var Ft=Mt;var It=Mt;var Et=Mt;var Bt=function(){this.size=0,this.__data__={hash:new At,map:new(xt||zt),string:new At}},kt=function(t){var r=Tt(this,t).delete(t);return this.size-=r?1:0,r},Lt=function(t){return Ft(this,t).get(t)},Ut=function(t){return It(this,t).has(t)},Dt=function(t,r){var e=Et(this,t),n=e.size;return e.set(t,r),this.size+=e.size==n?0:1,this};function Gt(t){var r=-1,e=null==t?0:t.length;for(this.clear();++r<e;){var n=t[r];this.set(n[0],n[1])}}Gt.prototype.clear=Bt,Gt.prototype.delete=kt,Gt.prototype.get=Lt,Gt.prototype.has=Ut,Gt.prototype.set=Dt;var Rt=Gt;function Vt(t,r){if("function"!=typeof t||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var e=function(){var n=arguments,o=r?r.apply(this,n):n[0],a=e.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return e.cache=a.set(o,i)||a,i};return e.cache=new(Vt.Cache||Rt),e}Vt.Cache=Rt;var Zt=Vt;var qt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ht=/\\(\\)?/g,Jt=function(t){var r=Zt(t,(function(t){return 500===e.size&&e.clear(),t})),e=r.cache;return r}((function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(qt,(function(t,e,n,o){r.push(n?o.replace(Ht,"$1"):e||t)})),r}));var Kt=function(t,r){for(var e=-1,n=null==t?0:t.length,o=Array(n);++e<n;)o[e]=r(t[e],e,t);return o},Qt=n,Wt=j,Xt=u?u.prototype:void 0,Yt=Xt?Xt.toString:void 0;var tr=function t(r){if("string"==typeof r)return r;if(Qt(r))return Kt(r,t)+"";if(Wt(r))return Yt?Yt.call(r):"";var e=r+"";return"0"==e&&1/r==-1/0?"-0":e},rr=tr;var er=n,nr=C,or=Jt,ar=function(t){return null==t?"":rr(t)};var ir=j;var ur=function(t,r){return er(t)?t:nr(t,r)?[t]:or(ar(t))},cr=function(t){if("string"==typeof t||ir(t))return t;var r=t+"";return"0"==r&&1/t==-1/0?"-0":r};var sr=function(t,r){for(var e=0,n=(r=ur(r,t)).length;null!=t&&e<n;)t=t[cr(r[e++])];return e&&e==n?t:void 0};var lr=e((function(t,r,e){var n=null==t?void 0:sr(t,r);return void 0===n?e:n}));const fr={columnIndexCache:new Map,columnNameCache:new Map};function pr(t){const r=t.toUpperCase();if(fr.columnIndexCache.has(r))return fr.columnIndexCache.get(r);let e=0;for(let t=0;t<r.length;t++)e=26*e+(r.charCodeAt(t)-65+1);const n=e-1;return fr.columnIndexCache.set(r,n),n}const hr={getStr(t=[],r,e=""){const n=lr(t,`[${r}]`,"");return"number"==typeof n?String(n):String(n||e).trim()},getNum(t=[],r,e=0){const n=lr(t,`[${r}]`,"");if(""===n)return e;if("number"==typeof n)return n;const o=Number(n);return isNaN(o)?e:o},getBool(t=[],r,e=!1){if(!Array.isArray(t))return e;const n=lr(t,`[${r}]`,e);return"boolean"==typeof n?n:e}},vr={getStr(t=[],r,e=""){const n=pr(r),o=lr(t,`[${n}]`,"");return"number"==typeof o?String(o):String(o||e).trim()},getNum(t=[],r,e=0){const n=pr(r),o=lr(t,`[${n}]`,"");if(""===o)return e;if("number"==typeof o)return o;const a=Number(o);return isNaN(a)?e:a},getBool(t=[],r,e=!1){const n=pr(r);if(!Array.isArray(t))return e;const o=lr(t,`[${n}]`,e);return"boolean"==typeof o?o:e}};return t.ColumnMapper=vr,t.IndexMapper=hr,t.delay=t=>new Promise((r=>setTimeout(r,t))),t.extractErrorMessage=t=>{let r="";if("object"==typeof t&&null!==t){if(t.message&&(r+=t.message+"\n"),t.errors&&t.errors.forEach((t=>{t.message&&(r+=t.message+"\n")})),t.response&&t.response.data&&t.response.data.error){const e=t.response.data.error;e.message&&(r+=e.message+"\n")}}else r+=String(t)+"\n";return r.trim()||"Noma'lum xatolik"},t.formatCurrencyPrice=(t,r,e="en-US")=>t?.toLocaleString(e,{style:"currency",currency:r}),t.formatDateLocaleString=(t,r="en-GB",e="Asia/Tashkent")=>new Date(t).toLocaleString(r,{timeZone:e}),t.formatPrice=t=>t.toString()?.replace(/\B(?=(\d{3})+(?!\d))/g," "),t.formatStringToFloat=t=>{(t=(t=t.toString()).replace(/\s/g,"")).includes(",")&&t.includes(".")?t=t.replace(/,/g,""):t.includes(",")&&(t=t.replace(/,/g,"."));const r=Number(t);return isNaN(r)?0:r},t.getColumnIndex=pr,t.getColumnName=function(t){if(fr.columnNameCache.has(t))return fr.columnNameCache.get(t);let r="";for(;t>=0;){const e=t%26;r=String.fromCharCode(65+e)+r,t=Math.floor(t/26)-1}return fr.columnNameCache.set(t,r),r},t.getValueByName=function(t=[],r,e=null){if(!Array.isArray(t))return e;const n=pr(r);return lr(t,`[${n}]`,e)},t.parseSeparatedNumber=t=>{const r=Number(t?.replace(/,/g,""));return isNaN(r)?0:r},Object.defineProperty(t,"__esModule",{value:!0}),t}({});
1
+ var apizum=function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var n=Array.isArray,o="object"==typeof e&&e&&e.Object===Object&&e,a="object"==typeof self&&self&&self.Object===Object&&self,i=o||a||Function("return this")(),u=i.Symbol,c=u,s=Object.prototype,l=s.hasOwnProperty,f=s.toString,p=c?c.toStringTag:void 0;var h=function(t){var e=l.call(t,p),r=t[p];try{t[p]=void 0;var n=!0}catch(t){}var o=f.call(t);return n&&(e?t[p]=r:delete t[p]),o},v=Object.prototype.toString;var d=h,y=function(t){return v.call(t)},_=u?u.toStringTag:void 0;var g=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":_&&_ in Object(t)?d(t):y(t)};var m=g,b=function(t){return null!=t&&"object"==typeof t};var j=function(t){return"symbol"==typeof t||b(t)&&"[object Symbol]"==m(t)},w=n,S=j,N=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,O=/^\w*$/;var C=function(t,e){if(w(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!S(t))||(O.test(t)||!N.test(t)||null!=e&&t in Object(e))};var $=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},A=g,z=$;var x,P=function(t){if(!z(t))return!1;var e=A(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},T=i["__core-js_shared__"],E=(x=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+x:"";var M=function(t){return!!E&&E in t},k=Function.prototype.toString;var F=P,I=M,B=$,L=function(t){if(null!=t){try{return k.call(t)}catch(t){}try{return t+""}catch(t){}}return""},U=/^\[object .+?Constructor\]$/,D=Function.prototype,G=Object.prototype,R=D.toString,V=G.hasOwnProperty,Z=RegExp("^"+R.call(V).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var q=function(t){return!(!B(t)||I(t))&&(F(t)?Z:U).test(L(t))},H=function(t,e){return null==t?void 0:t[e]};var J=function(t,e){var r=H(t,e);return q(r)?r:void 0},K=J(Object,"create"),Q=K;var W=function(){this.__data__=Q?Q(null):{},this.size=0};var X=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Y=K,tt=Object.prototype.hasOwnProperty;var et=function(t){var e=this.__data__;if(Y){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return tt.call(e,t)?e[t]:void 0},rt=K,nt=Object.prototype.hasOwnProperty;var ot=K;var at=W,it=X,ut=et,ct=function(t){var e=this.__data__;return rt?void 0!==e[t]:nt.call(e,t)},st=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ot&&void 0===e?"__lodash_hash_undefined__":e,this};function lt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}lt.prototype.clear=at,lt.prototype.delete=it,lt.prototype.get=ut,lt.prototype.has=ct,lt.prototype.set=st;var ft=lt;var pt=function(){this.__data__=[],this.size=0};var ht=function(t,e){return t===e||t!=t&&e!=e};var vt=function(t,e){for(var r=t.length;r--;)if(ht(t[r][0],e))return r;return-1},dt=vt,yt=Array.prototype.splice;var _t=vt;var gt=vt;var mt=vt;var bt=pt,jt=function(t){var e=this.__data__,r=dt(e,t);return!(r<0)&&(r==e.length-1?e.pop():yt.call(e,r,1),--this.size,!0)},wt=function(t){var e=this.__data__,r=_t(e,t);return r<0?void 0:e[r][1]},St=function(t){return gt(this.__data__,t)>-1},Nt=function(t,e){var r=this.__data__,n=mt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function Ot(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ot.prototype.clear=bt,Ot.prototype.delete=jt,Ot.prototype.get=wt,Ot.prototype.has=St,Ot.prototype.set=Nt;var Ct=Ot,$t=J(i,"Map"),At=ft,zt=Ct,xt=$t;var Pt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Tt=function(t,e){var r=t.__data__;return Pt(e)?r["string"==typeof e?"string":"hash"]:r.map},Et=Tt;var Mt=Tt;var kt=Tt;var Ft=Tt;var It=function(){this.size=0,this.__data__={hash:new At,map:new(xt||zt),string:new At}},Bt=function(t){var e=Et(this,t).delete(t);return this.size-=e?1:0,e},Lt=function(t){return Mt(this,t).get(t)},Ut=function(t){return kt(this,t).has(t)},Dt=function(t,e){var r=Ft(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function Gt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Gt.prototype.clear=It,Gt.prototype.delete=Bt,Gt.prototype.get=Lt,Gt.prototype.has=Ut,Gt.prototype.set=Dt;var Rt=Gt;function Vt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(Vt.Cache||Rt),r}Vt.Cache=Rt;var Zt=Vt;var qt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ht=/\\(\\)?/g,Jt=function(t){var e=Zt(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(qt,(function(t,r,n,o){e.push(n?o.replace(Ht,"$1"):r||t)})),e}));var Kt=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Qt=n,Wt=j,Xt=u?u.prototype:void 0,Yt=Xt?Xt.toString:void 0;var te=function t(e){if("string"==typeof e)return e;if(Qt(e))return Kt(e,t)+"";if(Wt(e))return Yt?Yt.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r},ee=te;var re=n,ne=C,oe=Jt,ae=function(t){return null==t?"":ee(t)};var ie=j;var ue=function(t,e){return re(t)?t:ne(t,e)?[t]:oe(ae(t))},ce=function(t){if("string"==typeof t||ie(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e};var se=function(t,e){for(var r=0,n=(e=ue(e,t)).length;null!=t&&r<n;)t=t[ce(e[r++])];return r&&r==n?t:void 0};var le=r((function(t,e,r){var n=null==t?void 0:se(t,e);return void 0===n?r:n}));const fe={columnIndexCache:new Map,columnNameCache:new Map};function pe(t){const e=t.toUpperCase();if(fe.columnIndexCache.has(e))return fe.columnIndexCache.get(e);let r=0;for(let t=0;t<e.length;t++)r=26*r+(e.charCodeAt(t)-65+1);const n=r-1;return fe.columnIndexCache.set(e,n),n}const he={getStr(t=[],e,r=""){const n=le(t,`[${e}]`,"");return"number"==typeof n?String(n):String(n||r).trim()},getNum(t=[],e,r=0){const n=le(t,`[${e}]`,"");if(""===n)return r;if("number"==typeof n)return n;const o=Number(n);return isNaN(o)?r:o},getBool(t=[],e,r=!1){if(!Array.isArray(t))return r;const n=le(t,`[${e}]`,r);return"boolean"==typeof n?n:r}},ve={getStr(t=[],e,r=""){const n=pe(e),o=le(t,`[${n}]`,"");return"number"==typeof o?String(o):String(o||r).trim()},getNum(t=[],e,r=0){const n=pe(e),o=le(t,`[${n}]`,"");if(""===o)return r;if("number"==typeof o)return o;const a=Number(o);return isNaN(a)?r:a},getBool(t=[],e,r=!1){const n=pe(e);if(!Array.isArray(t))return r;const o=le(t,`[${n}]`,r);return"boolean"==typeof o?o:r}};return t.ColumnMapper=ve,t.IndexMapper=he,t.checkEnvironment=t=>{const e="undefined"!=typeof window&&"undefined"!=typeof document,r="undefined"!=typeof process&&Boolean(process.versions?.node);if("frontend"===t&&!e)throw new Error("This function can only be used in a frontend environment.");if("backend"===t&&!r)throw new Error("This function can only be used in a backend environment.");return"frontend"===t?e:r},t.delay=t=>new Promise((e=>setTimeout(e,t))),t.extractErrorMessage=t=>{let e="";if("object"==typeof t&&null!==t){if(t.message&&(e+=t.message+"\n"),t.errors&&t.errors.forEach((t=>{t.message&&(e+=t.message+"\n")})),t.response&&t.response.data&&t.response.data.error){const r=t.response.data.error;r.message&&(e+=r.message+"\n")}}else e+=String(t)+"\n";return e.trim()||"Noma'lum xatolik"},t.formatCurrencyPrice=(t,e,r="en-US")=>t?.toLocaleString(r,{style:"currency",currency:e}),t.formatDateLocaleString=(t,e="en-GB",r="Asia/Tashkent")=>new Date(t).toLocaleString(e,{timeZone:r}),t.formatPrice=t=>t.toString()?.replace(/\B(?=(\d{3})+(?!\d))/g," "),t.formatStringToFloat=t=>{(t=(t=t.toString()).replace(/\s/g,"")).includes(",")&&t.includes(".")?t=t.replace(/,/g,""):t.includes(",")&&(t=t.replace(/,/g,"."));const e=Number(t);return isNaN(e)?0:e},t.getColumnIndex=pe,t.getColumnName=function(t){if(fe.columnNameCache.has(t))return fe.columnNameCache.get(t);let e="";for(;t>=0;){const r=t%26;e=String.fromCharCode(65+r)+e,t=Math.floor(t/26)-1}return fe.columnNameCache.set(t,e),e},t.getValueByName=function(t=[],e,r=null){if(!Array.isArray(t))return r;const n=pe(e);return le(t,`[${n}]`,r)},t.parseSeparatedNumber=t=>{const e=Number(t?.replace(/,/g,""));return isNaN(e)?0:e},Object.defineProperty(t,"__esModule",{value:!0}),t}({});
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).apizum={})}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var n=Array.isArray,o="object"==typeof e&&e&&e.Object===Object&&e,a="object"==typeof self&&self&&self.Object===Object&&self,i=o||a||Function("return this")(),u=i.Symbol,c=u,s=Object.prototype,l=s.hasOwnProperty,f=s.toString,p=c?c.toStringTag:void 0;var h=function(t){var e=l.call(t,p),r=t[p];try{t[p]=void 0;var n=!0}catch(t){}var o=f.call(t);return n&&(e?t[p]=r:delete t[p]),o},v=Object.prototype.toString;var y=h,d=function(t){return v.call(t)},_=u?u.toStringTag:void 0;var g=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":_&&_ in Object(t)?y(t):d(t)};var m=g,b=function(t){return null!=t&&"object"==typeof t};var j=function(t){return"symbol"==typeof t||b(t)&&"[object Symbol]"==m(t)},S=n,N=j,O=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,w=/^\w*$/;var C=function(t,e){if(S(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!N(t))||(w.test(t)||!O.test(t)||null!=e&&t in Object(e))};var $=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},x=g,A=$;var z,P=function(t){if(!A(t))return!1;var e=x(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},T=i["__core-js_shared__"],M=(z=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+z:"";var F=function(t){return!!M&&M in t},I=Function.prototype.toString;var E=P,B=F,k=$,L=function(t){if(null!=t){try{return I.call(t)}catch(t){}try{return t+""}catch(t){}}return""},U=/^\[object .+?Constructor\]$/,D=Function.prototype,G=Object.prototype,R=D.toString,V=G.hasOwnProperty,Z=RegExp("^"+R.call(V).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var q=function(t){return!(!k(t)||B(t))&&(E(t)?Z:U).test(L(t))},H=function(t,e){return null==t?void 0:t[e]};var J=function(t,e){var r=H(t,e);return q(r)?r:void 0},K=J(Object,"create"),Q=K;var W=function(){this.__data__=Q?Q(null):{},this.size=0};var X=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Y=K,tt=Object.prototype.hasOwnProperty;var et=function(t){var e=this.__data__;if(Y){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return tt.call(e,t)?e[t]:void 0},rt=K,nt=Object.prototype.hasOwnProperty;var ot=K;var at=W,it=X,ut=et,ct=function(t){var e=this.__data__;return rt?void 0!==e[t]:nt.call(e,t)},st=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ot&&void 0===e?"__lodash_hash_undefined__":e,this};function lt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}lt.prototype.clear=at,lt.prototype.delete=it,lt.prototype.get=ut,lt.prototype.has=ct,lt.prototype.set=st;var ft=lt;var pt=function(){this.__data__=[],this.size=0};var ht=function(t,e){return t===e||t!=t&&e!=e};var vt=function(t,e){for(var r=t.length;r--;)if(ht(t[r][0],e))return r;return-1},yt=vt,dt=Array.prototype.splice;var _t=vt;var gt=vt;var mt=vt;var bt=pt,jt=function(t){var e=this.__data__,r=yt(e,t);return!(r<0)&&(r==e.length-1?e.pop():dt.call(e,r,1),--this.size,!0)},St=function(t){var e=this.__data__,r=_t(e,t);return r<0?void 0:e[r][1]},Nt=function(t){return gt(this.__data__,t)>-1},Ot=function(t,e){var r=this.__data__,n=mt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function wt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}wt.prototype.clear=bt,wt.prototype.delete=jt,wt.prototype.get=St,wt.prototype.has=Nt,wt.prototype.set=Ot;var Ct=wt,$t=J(i,"Map"),xt=ft,At=Ct,zt=$t;var Pt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Tt=function(t,e){var r=t.__data__;return Pt(e)?r["string"==typeof e?"string":"hash"]:r.map},Mt=Tt;var Ft=Tt;var It=Tt;var Et=Tt;var Bt=function(){this.size=0,this.__data__={hash:new xt,map:new(zt||At),string:new xt}},kt=function(t){var e=Mt(this,t).delete(t);return this.size-=e?1:0,e},Lt=function(t){return Ft(this,t).get(t)},Ut=function(t){return It(this,t).has(t)},Dt=function(t,e){var r=Et(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function Gt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Gt.prototype.clear=Bt,Gt.prototype.delete=kt,Gt.prototype.get=Lt,Gt.prototype.has=Ut,Gt.prototype.set=Dt;var Rt=Gt;function Vt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(Vt.Cache||Rt),r}Vt.Cache=Rt;var Zt=Vt;var qt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ht=/\\(\\)?/g,Jt=function(t){var e=Zt(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(qt,(function(t,r,n,o){e.push(n?o.replace(Ht,"$1"):r||t)})),e}));var Kt=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Qt=n,Wt=j,Xt=u?u.prototype:void 0,Yt=Xt?Xt.toString:void 0;var te=function t(e){if("string"==typeof e)return e;if(Qt(e))return Kt(e,t)+"";if(Wt(e))return Yt?Yt.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r},ee=te;var re=n,ne=C,oe=Jt,ae=function(t){return null==t?"":ee(t)};var ie=j;var ue=function(t,e){return re(t)?t:ne(t,e)?[t]:oe(ae(t))},ce=function(t){if("string"==typeof t||ie(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e};var se=function(t,e){for(var r=0,n=(e=ue(e,t)).length;null!=t&&r<n;)t=t[ce(e[r++])];return r&&r==n?t:void 0};var le=r((function(t,e,r){var n=null==t?void 0:se(t,e);return void 0===n?r:n}));const fe={columnIndexCache:new Map,columnNameCache:new Map};function pe(t){const e=t.toUpperCase();if(fe.columnIndexCache.has(e))return fe.columnIndexCache.get(e);let r=0;for(let t=0;t<e.length;t++)r=26*r+(e.charCodeAt(t)-65+1);const n=r-1;return fe.columnIndexCache.set(e,n),n}const he={getStr(t=[],e,r=""){const n=le(t,`[${e}]`,"");return"number"==typeof n?String(n):String(n||r).trim()},getNum(t=[],e,r=0){const n=le(t,`[${e}]`,"");if(""===n)return r;if("number"==typeof n)return n;const o=Number(n);return isNaN(o)?r:o},getBool(t=[],e,r=!1){if(!Array.isArray(t))return r;const n=le(t,`[${e}]`,r);return"boolean"==typeof n?n:r}},ve={getStr(t=[],e,r=""){const n=pe(e),o=le(t,`[${n}]`,"");return"number"==typeof o?String(o):String(o||r).trim()},getNum(t=[],e,r=0){const n=pe(e),o=le(t,`[${n}]`,"");if(""===o)return r;if("number"==typeof o)return o;const a=Number(o);return isNaN(a)?r:a},getBool(t=[],e,r=!1){const n=pe(e);if(!Array.isArray(t))return r;const o=le(t,`[${n}]`,r);return"boolean"==typeof o?o:r}};t.ColumnMapper=ve,t.IndexMapper=he,t.delay=t=>new Promise((e=>setTimeout(e,t))),t.extractErrorMessage=t=>{let e="";if("object"==typeof t&&null!==t){if(t.message&&(e+=t.message+"\n"),t.errors&&t.errors.forEach((t=>{t.message&&(e+=t.message+"\n")})),t.response&&t.response.data&&t.response.data.error){const r=t.response.data.error;r.message&&(e+=r.message+"\n")}}else e+=String(t)+"\n";return e.trim()||"Noma'lum xatolik"},t.formatCurrencyPrice=(t,e,r="en-US")=>t?.toLocaleString(r,{style:"currency",currency:e}),t.formatDateLocaleString=(t,e="en-GB",r="Asia/Tashkent")=>new Date(t).toLocaleString(e,{timeZone:r}),t.formatPrice=t=>t.toString()?.replace(/\B(?=(\d{3})+(?!\d))/g," "),t.formatStringToFloat=t=>{(t=(t=t.toString()).replace(/\s/g,"")).includes(",")&&t.includes(".")?t=t.replace(/,/g,""):t.includes(",")&&(t=t.replace(/,/g,"."));const e=Number(t);return isNaN(e)?0:e},t.getColumnIndex=pe,t.getColumnName=function(t){if(fe.columnNameCache.has(t))return fe.columnNameCache.get(t);let e="";for(;t>=0;){const r=t%26;e=String.fromCharCode(65+r)+e,t=Math.floor(t/26)-1}return fe.columnNameCache.set(t,e),e},t.getValueByName=function(t=[],e,r=null){if(!Array.isArray(t))return r;const n=pe(e);return le(t,`[${n}]`,r)},t.parseSeparatedNumber=t=>{const e=Number(t?.replace(/,/g,""));return isNaN(e)?0:e},Object.defineProperty(t,"__esModule",{value:!0})}));
1
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).apizum={})}(this,(function(t){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var n=Array.isArray,o="object"==typeof e&&e&&e.Object===Object&&e,a="object"==typeof self&&self&&self.Object===Object&&self,i=o||a||Function("return this")(),u=i.Symbol,c=u,s=Object.prototype,l=s.hasOwnProperty,f=s.toString,p=c?c.toStringTag:void 0;var h=function(t){var e=l.call(t,p),r=t[p];try{t[p]=void 0;var n=!0}catch(t){}var o=f.call(t);return n&&(e?t[p]=r:delete t[p]),o},d=Object.prototype.toString;var v=h,y=function(t){return d.call(t)},_=u?u.toStringTag:void 0;var g=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":_&&_ in Object(t)?v(t):y(t)};var m=g,b=function(t){return null!=t&&"object"==typeof t};var j=function(t){return"symbol"==typeof t||b(t)&&"[object Symbol]"==m(t)},w=n,S=j,N=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,O=/^\w*$/;var C=function(t,e){if(w(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!S(t))||(O.test(t)||!N.test(t)||null!=e&&t in Object(e))};var $=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},x=g,A=$;var z,T=function(t){if(!A(t))return!1;var e=x(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},P=i["__core-js_shared__"],E=(z=/[^.]+$/.exec(P&&P.keys&&P.keys.IE_PROTO||""))?"Symbol(src)_1."+z:"";var M=function(t){return!!E&&E in t},k=Function.prototype.toString;var F=T,I=M,B=$,L=function(t){if(null!=t){try{return k.call(t)}catch(t){}try{return t+""}catch(t){}}return""},U=/^\[object .+?Constructor\]$/,D=Function.prototype,G=Object.prototype,R=D.toString,V=G.hasOwnProperty,Z=RegExp("^"+R.call(V).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var q=function(t){return!(!B(t)||I(t))&&(F(t)?Z:U).test(L(t))},H=function(t,e){return null==t?void 0:t[e]};var J=function(t,e){var r=H(t,e);return q(r)?r:void 0},K=J(Object,"create"),Q=K;var W=function(){this.__data__=Q?Q(null):{},this.size=0};var X=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Y=K,tt=Object.prototype.hasOwnProperty;var et=function(t){var e=this.__data__;if(Y){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return tt.call(e,t)?e[t]:void 0},rt=K,nt=Object.prototype.hasOwnProperty;var ot=K;var at=W,it=X,ut=et,ct=function(t){var e=this.__data__;return rt?void 0!==e[t]:nt.call(e,t)},st=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ot&&void 0===e?"__lodash_hash_undefined__":e,this};function lt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}lt.prototype.clear=at,lt.prototype.delete=it,lt.prototype.get=ut,lt.prototype.has=ct,lt.prototype.set=st;var ft=lt;var pt=function(){this.__data__=[],this.size=0};var ht=function(t,e){return t===e||t!=t&&e!=e};var dt=function(t,e){for(var r=t.length;r--;)if(ht(t[r][0],e))return r;return-1},vt=dt,yt=Array.prototype.splice;var _t=dt;var gt=dt;var mt=dt;var bt=pt,jt=function(t){var e=this.__data__,r=vt(e,t);return!(r<0)&&(r==e.length-1?e.pop():yt.call(e,r,1),--this.size,!0)},wt=function(t){var e=this.__data__,r=_t(e,t);return r<0?void 0:e[r][1]},St=function(t){return gt(this.__data__,t)>-1},Nt=function(t,e){var r=this.__data__,n=mt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this};function Ot(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ot.prototype.clear=bt,Ot.prototype.delete=jt,Ot.prototype.get=wt,Ot.prototype.has=St,Ot.prototype.set=Nt;var Ct=Ot,$t=J(i,"Map"),xt=ft,At=Ct,zt=$t;var Tt=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Pt=function(t,e){var r=t.__data__;return Tt(e)?r["string"==typeof e?"string":"hash"]:r.map},Et=Pt;var Mt=Pt;var kt=Pt;var Ft=Pt;var It=function(){this.size=0,this.__data__={hash:new xt,map:new(zt||At),string:new xt}},Bt=function(t){var e=Et(this,t).delete(t);return this.size-=e?1:0,e},Lt=function(t){return Mt(this,t).get(t)},Ut=function(t){return kt(this,t).has(t)},Dt=function(t,e){var r=Ft(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};function Gt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Gt.prototype.clear=It,Gt.prototype.delete=Bt,Gt.prototype.get=Lt,Gt.prototype.has=Ut,Gt.prototype.set=Dt;var Rt=Gt;function Vt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(Vt.Cache||Rt),r}Vt.Cache=Rt;var Zt=Vt;var qt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ht=/\\(\\)?/g,Jt=function(t){var e=Zt(t,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(qt,(function(t,r,n,o){e.push(n?o.replace(Ht,"$1"):r||t)})),e}));var Kt=function(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o},Qt=n,Wt=j,Xt=u?u.prototype:void 0,Yt=Xt?Xt.toString:void 0;var te=function t(e){if("string"==typeof e)return e;if(Qt(e))return Kt(e,t)+"";if(Wt(e))return Yt?Yt.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r},ee=te;var re=n,ne=C,oe=Jt,ae=function(t){return null==t?"":ee(t)};var ie=j;var ue=function(t,e){return re(t)?t:ne(t,e)?[t]:oe(ae(t))},ce=function(t){if("string"==typeof t||ie(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e};var se=function(t,e){for(var r=0,n=(e=ue(e,t)).length;null!=t&&r<n;)t=t[ce(e[r++])];return r&&r==n?t:void 0};var le=r((function(t,e,r){var n=null==t?void 0:se(t,e);return void 0===n?r:n}));const fe={columnIndexCache:new Map,columnNameCache:new Map};function pe(t){const e=t.toUpperCase();if(fe.columnIndexCache.has(e))return fe.columnIndexCache.get(e);let r=0;for(let t=0;t<e.length;t++)r=26*r+(e.charCodeAt(t)-65+1);const n=r-1;return fe.columnIndexCache.set(e,n),n}const he={getStr(t=[],e,r=""){const n=le(t,`[${e}]`,"");return"number"==typeof n?String(n):String(n||r).trim()},getNum(t=[],e,r=0){const n=le(t,`[${e}]`,"");if(""===n)return r;if("number"==typeof n)return n;const o=Number(n);return isNaN(o)?r:o},getBool(t=[],e,r=!1){if(!Array.isArray(t))return r;const n=le(t,`[${e}]`,r);return"boolean"==typeof n?n:r}},de={getStr(t=[],e,r=""){const n=pe(e),o=le(t,`[${n}]`,"");return"number"==typeof o?String(o):String(o||r).trim()},getNum(t=[],e,r=0){const n=pe(e),o=le(t,`[${n}]`,"");if(""===o)return r;if("number"==typeof o)return o;const a=Number(o);return isNaN(a)?r:a},getBool(t=[],e,r=!1){const n=pe(e);if(!Array.isArray(t))return r;const o=le(t,`[${n}]`,r);return"boolean"==typeof o?o:r}};t.ColumnMapper=de,t.IndexMapper=he,t.checkEnvironment=t=>{const e="undefined"!=typeof window&&"undefined"!=typeof document,r="undefined"!=typeof process&&Boolean(process.versions?.node);if("frontend"===t&&!e)throw new Error("This function can only be used in a frontend environment.");if("backend"===t&&!r)throw new Error("This function can only be used in a backend environment.");return"frontend"===t?e:r},t.delay=t=>new Promise((e=>setTimeout(e,t))),t.extractErrorMessage=t=>{let e="";if("object"==typeof t&&null!==t){if(t.message&&(e+=t.message+"\n"),t.errors&&t.errors.forEach((t=>{t.message&&(e+=t.message+"\n")})),t.response&&t.response.data&&t.response.data.error){const r=t.response.data.error;r.message&&(e+=r.message+"\n")}}else e+=String(t)+"\n";return e.trim()||"Noma'lum xatolik"},t.formatCurrencyPrice=(t,e,r="en-US")=>t?.toLocaleString(r,{style:"currency",currency:e}),t.formatDateLocaleString=(t,e="en-GB",r="Asia/Tashkent")=>new Date(t).toLocaleString(e,{timeZone:r}),t.formatPrice=t=>t.toString()?.replace(/\B(?=(\d{3})+(?!\d))/g," "),t.formatStringToFloat=t=>{(t=(t=t.toString()).replace(/\s/g,"")).includes(",")&&t.includes(".")?t=t.replace(/,/g,""):t.includes(",")&&(t=t.replace(/,/g,"."));const e=Number(t);return isNaN(e)?0:e},t.getColumnIndex=pe,t.getColumnName=function(t){if(fe.columnNameCache.has(t))return fe.columnNameCache.get(t);let e="";for(;t>=0;){const r=t%26;e=String.fromCharCode(65+r)+e,t=Math.floor(t/26)-1}return fe.columnNameCache.set(t,e),e},t.getValueByName=function(t=[],e,r=null){if(!Array.isArray(t))return r;const n=pe(e);return le(t,`[${n}]`,r)},t.parseSeparatedNumber=t=>{const e=Number(t?.replace(/,/g,""));return isNaN(e)?0:e},Object.defineProperty(t,"__esModule",{value:!0})}));
package/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./utils/tools.js"),r=require("./utils/mappers.js"),t=require("./utils/extract-error-message.js");exports.delay=e.delay,exports.formatCurrencyPrice=e.formatCurrencyPrice,exports.formatDateLocaleString=e.formatDateLocaleString,exports.formatPrice=e.formatPrice,exports.formatStringToFloat=e.formatStringToFloat,exports.parseSeparatedNumber=e.parseSeparatedNumber,exports.ColumnMapper=r.ColumnMapper,exports.IndexMapper=r.IndexMapper,exports.getColumnIndex=r.getColumnIndex,exports.getColumnName=r.getColumnName,exports.getValueByName=r.getValueByName,exports.extractErrorMessage=t.default;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./utils/tools.js"),r=require("./utils/mappers.js"),t=require("./utils/check-environment.js"),o=require("./utils/extract-error-message.js");exports.delay=e.delay,exports.formatCurrencyPrice=e.formatCurrencyPrice,exports.formatDateLocaleString=e.formatDateLocaleString,exports.formatPrice=e.formatPrice,exports.formatStringToFloat=e.formatStringToFloat,exports.parseSeparatedNumber=e.parseSeparatedNumber,exports.ColumnMapper=r.ColumnMapper,exports.IndexMapper=r.IndexMapper,exports.getColumnIndex=r.getColumnIndex,exports.getColumnName=r.getColumnName,exports.getValueByName=r.getValueByName,exports.checkEnvironment=t.default,exports.extractErrorMessage=o.default;
@@ -0,0 +1,3 @@
1
+ declare const checkEnvironment: (target: "frontend" | "backend") => boolean;
2
+ export default checkEnvironment;
3
+ //# sourceMappingURL=check-environment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-environment.d.ts","sourceRoot":"","sources":["../../../src/utils/check-environment.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,gBAAgB,WAAY,UAAU,GAAG,SAAS,KAAG,OAa1D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.default=e=>{const n="undefined"!=typeof window&&"undefined"!=typeof document,o="undefined"!=typeof process&&Boolean(process.versions?.node);if("frontend"===e&&!n)throw new Error("This function can only be used in a frontend environment.");if("backend"===e&&!o)throw new Error("This function can only be used in a backend environment.");return"frontend"===e?n:o};
@@ -1,4 +1,5 @@
1
1
  export * from "./tools";
2
2
  export * from "./mappers";
3
+ export { default as checkEnvironment } from "./check-environment";
3
4
  export { default as extractErrorMessage } from "./extract-error-message";
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAE1B,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAE1B,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./tools.js"),r=require("./mappers.js"),t=require("./extract-error-message.js");exports.delay=e.delay,exports.formatCurrencyPrice=e.formatCurrencyPrice,exports.formatDateLocaleString=e.formatDateLocaleString,exports.formatPrice=e.formatPrice,exports.formatStringToFloat=e.formatStringToFloat,exports.parseSeparatedNumber=e.parseSeparatedNumber,exports.ColumnMapper=r.ColumnMapper,exports.IndexMapper=r.IndexMapper,exports.getColumnIndex=r.getColumnIndex,exports.getColumnName=r.getColumnName,exports.getValueByName=r.getValueByName,exports.extractErrorMessage=t.default;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./tools.js"),r=require("./mappers.js"),t=require("./check-environment.js"),o=require("./extract-error-message.js");exports.delay=e.delay,exports.formatCurrencyPrice=e.formatCurrencyPrice,exports.formatDateLocaleString=e.formatDateLocaleString,exports.formatPrice=e.formatPrice,exports.formatStringToFloat=e.formatStringToFloat,exports.parseSeparatedNumber=e.parseSeparatedNumber,exports.ColumnMapper=r.ColumnMapper,exports.IndexMapper=r.IndexMapper,exports.getColumnIndex=r.getColumnIndex,exports.getColumnName=r.getColumnName,exports.getValueByName=r.getValueByName,exports.checkEnvironment=t.default,exports.extractErrorMessage=o.default;
package/lib/esm/index.js CHANGED
@@ -1 +1 @@
1
- export{delay,formatCurrencyPrice,formatDateLocaleString,formatPrice,formatStringToFloat,parseSeparatedNumber}from"./utils/tools.js";export{ColumnMapper,IndexMapper,getColumnIndex,getColumnName,getValueByName}from"./utils/mappers.js";export{default as extractErrorMessage}from"./utils/extract-error-message.js";
1
+ export{delay,formatCurrencyPrice,formatDateLocaleString,formatPrice,formatStringToFloat,parseSeparatedNumber}from"./utils/tools.js";export{ColumnMapper,IndexMapper,getColumnIndex,getColumnName,getValueByName}from"./utils/mappers.js";export{default as checkEnvironment}from"./utils/check-environment.js";export{default as extractErrorMessage}from"./utils/extract-error-message.js";
@@ -0,0 +1,3 @@
1
+ declare const checkEnvironment: (target: "frontend" | "backend") => boolean;
2
+ export default checkEnvironment;
3
+ //# sourceMappingURL=check-environment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-environment.d.ts","sourceRoot":"","sources":["../../../src/utils/check-environment.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,gBAAgB,WAAY,UAAU,GAAG,SAAS,KAAG,OAa1D,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1 @@
1
+ const n=n=>{const e="undefined"!=typeof window&&"undefined"!=typeof document,o="undefined"!=typeof process&&Boolean(process.versions?.node);if("frontend"===n&&!e)throw new Error("This function can only be used in a frontend environment.");if("backend"===n&&!o)throw new Error("This function can only be used in a backend environment.");return"frontend"===n?e:o};export{n as default};
@@ -1,4 +1,5 @@
1
1
  export * from "./tools";
2
2
  export * from "./mappers";
3
+ export { default as checkEnvironment } from "./check-environment";
3
4
  export { default as extractErrorMessage } from "./extract-error-message";
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAE1B,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAE1B,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,yBAAyB,CAAC"}
@@ -1 +1 @@
1
- export{delay,formatCurrencyPrice,formatDateLocaleString,formatPrice,formatStringToFloat,parseSeparatedNumber}from"./tools.js";export{ColumnMapper,IndexMapper,getColumnIndex,getColumnName,getValueByName}from"./mappers.js";export{default as extractErrorMessage}from"./extract-error-message.js";
1
+ export{delay,formatCurrencyPrice,formatDateLocaleString,formatPrice,formatStringToFloat,parseSeparatedNumber}from"./tools.js";export{ColumnMapper,IndexMapper,getColumnIndex,getColumnName,getValueByName}from"./mappers.js";export{default as checkEnvironment}from"./check-environment.js";export{default as extractErrorMessage}from"./extract-error-message.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "utilzify",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "outputDir": "./lib",
5
5
  "exports": {
6
6
  "import": {