@take-out/helpers 0.0.30 → 0.0.31
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/dist/cjs/browser/openPopup.js.map +1 -1
- package/dist/cjs/string/hash.js.map +1 -1
- package/dist/cjs/string/pluralize.js.map +1 -1
- package/dist/cjs/url/urlSanitize.js.map +1 -1
- package/dist/cjs/url/urlValidate.js.map +1 -1
- package/dist/esm/browser/openPopup.js.map +1 -1
- package/dist/esm/browser/openPopup.mjs.map +1 -1
- package/dist/esm/browser/openPopup.native.js.map +1 -1
- package/dist/esm/string/hash.js.map +1 -1
- package/dist/esm/string/hash.mjs.map +1 -1
- package/dist/esm/string/hash.native.js.map +1 -1
- package/dist/esm/string/pluralize.js.map +1 -1
- package/dist/esm/string/pluralize.mjs.map +1 -1
- package/dist/esm/url/urlSanitize.js.map +1 -1
- package/dist/esm/url/urlSanitize.mjs.map +1 -1
- package/dist/esm/url/urlValidate.js.map +1 -1
- package/dist/esm/url/urlValidate.mjs.map +1 -1
- package/package.json +2 -2
- package/src/browser/openPopup.ts +1 -1
- package/src/string/hash.ts +2 -2
- package/src/string/pluralize.ts +2 -2
- package/src/url/urlSanitize.ts +1 -1
- package/src/url/urlValidate.ts +1 -1
- package/types/browser/openPopup.d.ts +1 -1
- package/types/browser/openPopup.d.ts.map +2 -2
- package/types/string/hash.d.ts +2 -2
- package/types/string/hash.d.ts.map +1 -1
- package/types/string/pluralize.d.ts +2 -2
- package/types/string/pluralize.d.ts.map +1 -1
- package/types/url/urlSanitize.d.ts +1 -1
- package/types/url/urlSanitize.d.ts.map +1 -1
- package/types/url/urlValidate.d.ts +1 -1
- package/types/url/urlValidate.d.ts.map +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/browser/openPopup.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,SAAS,kBACd,KACA,OACA,OACA,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,SAAS,kBACd,KACA,OACA,OACA,QACe;AAEf,QAAM,cAAc,OAAO,cAAc,OAAO,OAC1C,eAAe,OAAO,eAAe,OAAO,QAE5C,cAAc,eAAe,QAI7B,OAAO,KAAK,IAAI,IAAI,cAAc,SAAS,CAAC,KAAK,cAAc,MAAM,IACrE,MAAM,KAAK,IAAI,KAAK,cAAc,MAAM,KAAK,IAAI,IAAI,eAAe,UAAU,CAAC,CAAC,GAEhF,iBAAiB;AAAA,YACb,KAAK;AAAA,aACJ,MAAM;AAAA,WACR,IAAI;AAAA,UACL,GAAG;AAAA;AAAA;AAAA;AAKX,SAAO,OAAO,KAAK,KAAK,OAAO,cAAc;AAC/C;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/string/hash.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,SAAS,WAAW,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEO,SAAS,WAAW,KAAqB;AAE9C,SAAO,IACJ,MAAM,EAAE,EACR,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC,EACxD,KAAK,EAAE;AACZ;AAEO,SAAS,aAAa,SAAyB;AAEpD,SACE,QACG,MAAM,OAAO,GACZ,IAAI,CAAC,MAAM,OAAO,aAAa,SAAS,GAAG,EAAE,CAAC,CAAC,EAChD,KAAK,EAAE,KAAK;AAEnB;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/string/pluralize.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAI,cAAc,IAAI,KAAK,YAAY,OAAO;AAEvC,SAAS,UAAU,OAAe,UAAkB,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAI,cAAc,IAAI,KAAK,YAAY,OAAO;AAEvC,SAAS,UAAU,OAAe,UAAkB,QAAwB;AACjF,QAAM,oBAAoB,YAAY,OAAO,KAAK;AAClD,UAAQ,mBAAmB;AAAA,IACzB,KAAK;AACH,aAAO,GAAG,KAAK,IAAI,QAAQ;AAAA,IAC7B,KAAK;AACH,aAAO,GAAG,KAAK,IAAI,MAAM;AAAA,IAC3B;AACE,YAAM,IAAI;AAAA,QACR,oBAAoB,iBAAiB,QAAQ,KAAK,MAAM,QAAQ,MAAM,MAAM;AAAA,MAC9E;AAAA,EACJ;AACF;AAEO,SAAS,mBAAmB,QAAoC;AACrE,gBAAc,IAAI,KAAK,YAAY,MAAM;AAC3C;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/url/urlSanitize.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,MAAM,YAAY,oBAAI,IAAI,CAAC,SAAS,UAAU,WAAW,QAAQ,MAAM,CAAC;AAEjE,SAAS,YAAY,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,MAAM,YAAY,oBAAI,IAAI,CAAC,SAAS,UAAU,WAAW,QAAQ,MAAM,CAAC;AAEjE,SAAS,YAAY,KAAqB;AAC/C,MAAI;AACF,UAAM,YAAY,IAAI,IAAI,GAAG;AAC7B,QAAI,CAAC,UAAU,IAAI,UAAU,QAAQ;AACnC,aAAO;AAAA,EAEX,QAAQ;AACN,WAAO;AAAA,EACT;AACA,SAAO;AACT;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/url/urlValidate.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,MAAM,YAAY,IAAI;AAAA,EACpB;AACF;AAEO,SAAS,YAAY,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,MAAM,YAAY,IAAI;AAAA,EACpB;AACF;AAEO,SAAS,YAAY,KAAsB;AAGhD,SAAO,QAAQ,cAAc,UAAU,KAAK,GAAG;AACjD;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/browser/openPopup.ts"],
|
|
4
|
-
"mappings": "AAEO,SAAS,kBACd,KACA,OACA,OACA,
|
|
4
|
+
"mappings": "AAEO,SAAS,kBACd,KACA,OACA,OACA,QACe;AAEf,QAAM,cAAc,OAAO,cAAc,OAAO,OAC1C,eAAe,OAAO,eAAe,OAAO,QAE5C,cAAc,eAAe,QAI7B,OAAO,KAAK,IAAI,IAAI,cAAc,SAAS,CAAC,KAAK,cAAc,MAAM,IACrE,MAAM,KAAK,IAAI,KAAK,cAAc,MAAM,KAAK,IAAI,IAAI,eAAe,UAAU,CAAC,CAAC,GAEhF,iBAAiB;AAAA,YACb,KAAK;AAAA,aACJ,MAAM;AAAA,WACR,IAAI;AAAA,UACL,GAAG;AAAA;AAAA;AAAA;AAKX,SAAO,OAAO,KAAK,KAAK,OAAO,cAAc;AAC/C;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["openCenteredPopup","url","title","width","height","screenWidth","screen","availWidth","screenHeight","availHeight","shouldGuess","left","Math","max","top","windowFeatures","window","open"],"sources":["../../../src/browser/openPopup.ts"],"sourcesContent":[null],"mappings":"AAEO,SAASA,kBACdC,GAAA,EACAC,KAAA,EACAC,KAAA,EACAC,MAAA,
|
|
1
|
+
{"version":3,"names":["openCenteredPopup","url","title","width","height","screenWidth","screen","availWidth","screenHeight","availHeight","shouldGuess","left","Math","max","top","windowFeatures","window","open"],"sources":["../../../src/browser/openPopup.ts"],"sourcesContent":[null],"mappings":"AAEO,SAASA,kBACdC,GAAA,EACAC,KAAA,EACAC,KAAA,EACAC,MAAA,EACe;EAEf,MAAMC,WAAA,GAAcC,MAAA,CAAOC,UAAA,IAAcD,MAAA,CAAOH,KAAA;IAC1CK,YAAA,GAAeF,MAAA,CAAOG,WAAA,IAAeH,MAAA,CAAOF,MAAA;IAE5CM,WAAA,GAAcF,YAAA,GAAeJ,MAAA;IAI7BO,IAAA,GAAOC,IAAA,CAAKC,GAAA,CAAI,IAAIR,WAAA,GAAcF,KAAA,IAAS,CAAC,KAAKO,WAAA,GAAc,MAAM;IACrEI,GAAA,GAAMF,IAAA,CAAKC,GAAA,CAAI,KAAKH,WAAA,GAAc,MAAME,IAAA,CAAKC,GAAA,CAAI,IAAIL,YAAA,GAAeJ,MAAA,IAAU,CAAC,CAAC;IAEhFW,cAAA,GAAiB;AAAA,YACbZ,KAAK;AAAA,aACJC,MAAM;AAAA,WACRO,IAAI;AAAA,UACLG,GAAG;AAAA;AAAA;AAAA;EAKX,OAAOE,MAAA,CAAOC,IAAA,CAAKhB,GAAA,EAAKC,KAAA,EAAOa,cAAc;AAC/C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["openCenteredPopup","url","title","width","height","screenWidth","screen","availWidth","screenHeight","availHeight","shouldGuess","left","Math","max","top","windowFeatures","window","open"],"sources":["../../../src/browser/openPopup.ts"],"sourcesContent":[null],"mappings":"AAEO,SAASA,kBACdC,GAAA,EACAC,KAAA,EACAC,KAAA,EACAC,MAAA,
|
|
1
|
+
{"version":3,"names":["openCenteredPopup","url","title","width","height","screenWidth","screen","availWidth","screenHeight","availHeight","shouldGuess","left","Math","max","top","windowFeatures","window","open"],"sources":["../../../src/browser/openPopup.ts"],"sourcesContent":[null],"mappings":"AAEO,SAASA,kBACdC,GAAA,EACAC,KAAA,EACAC,KAAA,EACAC,MAAA,EACe;EAEf,IAAAC,WAAM,GAAAC,MAAc,CAAAC,UAAO,IAAAD,MAAc,CAAAH,KAAO;IAAAK,YAC1C,GAAAF,MAAe,CAAAG,WAAO,IAAAH,MAAe,CAAAF,MAAO;IAAAM,WAE5C,GAAAF,YAAc,GAAAJ,MAAe;IAAAO,IAI7B,GAAAC,IAAO,CAAAC,GAAK,IAAI,CAAAR,WAAI,GAAAF,KAAc,MAAS,IAACO,WAAK,MAAc,KAAM;IAAAI,GACrE,GAAAF,IAAM,CAAAC,GAAK,IAAI,EAAAH,WAAK,MAAc,GAAAE,IAAM,CAAAC,GAAK,IAAI,CAAAL,YAAI,GAAAJ,MAAe,MAAU,CAAC;IAACW,cAEhF;AAAiB,YACbZ,KAAK;AAAA,aACJC,MAAM;AAAA,WACRO,IAAI;AAAA,UACLG,GAAG;AAAA;AAAA;AAAA;EAKX,OAAOE,MAAA,CAAOC,IAAA,CAAKhB,GAAA,EAAKC,KAAA,EAAOa,cAAc;AAC/C","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/string/hash.ts"],
|
|
4
|
-
"mappings": "AAEO,SAAS,WAAW,
|
|
4
|
+
"mappings": "AAEO,SAAS,WAAW,KAAqB;AAE9C,SAAO,IACJ,MAAM,EAAE,EACR,IAAI,CAAC,MAAM,EAAE,WAAW,CAAC,EAAE,SAAS,EAAE,EAAE,SAAS,GAAG,GAAG,CAAC,EACxD,KAAK,EAAE;AACZ;AAEO,SAAS,aAAa,SAAyB;AAEpD,SACE,QACG,MAAM,OAAO,GACZ,IAAI,CAAC,MAAM,OAAO,aAAa,SAAS,GAAG,EAAE,CAAC,CAAC,EAChD,KAAK,EAAE,KAAK;AAEnB;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["hashString","str","split","map","c","charCodeAt","toString","padStart","join","unhashString","encoded","match","h","String","fromCharCode","parseInt"],"sources":["../../../src/string/hash.ts"],"sourcesContent":[null],"mappings":"AAEO,SAASA,WAAWC,GAAA,
|
|
1
|
+
{"version":3,"names":["hashString","str","split","map","c","charCodeAt","toString","padStart","join","unhashString","encoded","match","h","String","fromCharCode","parseInt"],"sources":["../../../src/string/hash.ts"],"sourcesContent":[null],"mappings":"AAEO,SAASA,WAAWC,GAAA,EAAqB;EAE9C,OAAOA,GAAA,CACJC,KAAA,CAAM,EAAE,EACRC,GAAA,CAAKC,CAAA,IAAMA,CAAA,CAAEC,UAAA,CAAW,CAAC,EAAEC,QAAA,CAAS,EAAE,EAAEC,QAAA,CAAS,GAAG,GAAG,CAAC,EACxDC,IAAA,CAAK,EAAE;AACZ;AAEO,SAASC,aAAaC,OAAA,EAAyB;EAEpD,OACEA,OAAA,CACGC,KAAA,CAAM,OAAO,GACZR,GAAA,CAAKS,CAAA,IAAMC,MAAA,CAAOC,YAAA,CAAaC,QAAA,CAASH,CAAA,EAAG,EAAE,CAAC,CAAC,EAChDJ,IAAA,CAAK,EAAE,KAAK;AAEnB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["hashString","str","split","map","c","charCodeAt","toString","padStart","join","unhashString","encoded"],"sources":["../../../src/string/hash.ts"],"sourcesContent":[null],"mappings":"AAEO,SAASA,WAAWC,GAAA,
|
|
1
|
+
{"version":3,"names":["hashString","str","split","map","c","charCodeAt","toString","padStart","join","unhashString","encoded"],"sources":["../../../src/string/hash.ts"],"sourcesContent":[null],"mappings":"AAEO,SAASA,WAAWC,GAAA,EAAqB;EAE9C,OAAOA,GAAA,CACJC,KAAA,CAAM,EAAE,EACRC,GAAA,CAAI,UAASC,CAAA;IAElB,OAAAA,CAAA,CAAAC,UAAA,IAAAC,QAAA,KAAAC,QAAA;EAEO,GAAAC,IAAS;AAEd;AAMF,SAAAC,aAAAC,OAAA","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/string/pluralize.ts"],
|
|
4
|
-
"mappings": "AAAA,IAAI,cAAc,IAAI,KAAK,YAAY,OAAO;AAEvC,SAAS,UAAU,OAAe,UAAkB,
|
|
4
|
+
"mappings": "AAAA,IAAI,cAAc,IAAI,KAAK,YAAY,OAAO;AAEvC,SAAS,UAAU,OAAe,UAAkB,QAAwB;AACjF,QAAM,oBAAoB,YAAY,OAAO,KAAK;AAClD,UAAQ,mBAAmB;AAAA,IACzB,KAAK;AACH,aAAO,GAAG,KAAK,IAAI,QAAQ;AAAA,IAC7B,KAAK;AACH,aAAO,GAAG,KAAK,IAAI,MAAM;AAAA,IAC3B;AACE,YAAM,IAAI;AAAA,QACR,oBAAoB,iBAAiB,QAAQ,KAAK,MAAM,QAAQ,MAAM,MAAM;AAAA,MAC9E;AAAA,EACJ;AACF;AAEO,SAAS,mBAAmB,QAAoC;AACrE,gBAAc,IAAI,KAAK,YAAY,MAAM;AAC3C;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["pluralRules","Intl","PluralRules","pluralize","count","singular","plural","grammaticalNumber","select","Error","setPluralizeLocale","locale"],"sources":["../../../src/string/pluralize.ts"],"sourcesContent":[null],"mappings":"AAAA,IAAIA,WAAA,GAAc,IAAIC,IAAA,CAAKC,WAAA,CAAY,OAAO;AAEvC,SAASC,UAAUC,KAAA,EAAeC,QAAA,EAAkBC,MAAA,
|
|
1
|
+
{"version":3,"names":["pluralRules","Intl","PluralRules","pluralize","count","singular","plural","grammaticalNumber","select","Error","setPluralizeLocale","locale"],"sources":["../../../src/string/pluralize.ts"],"sourcesContent":[null],"mappings":"AAAA,IAAIA,WAAA,GAAc,IAAIC,IAAA,CAAKC,WAAA,CAAY,OAAO;AAEvC,SAASC,UAAUC,KAAA,EAAeC,QAAA,EAAkBC,MAAA,EAAwB;EACjF,MAAMC,iBAAA,GAAoBP,WAAA,CAAYQ,MAAA,CAAOJ,KAAK;EAClD,QAAQG,iBAAA;IACN,KAAK;MACH,OAAO,GAAGH,KAAK,IAAIC,QAAQ;IAC7B,KAAK;MACH,OAAO,GAAGD,KAAK,IAAIE,MAAM;IAC3B;MACE,MAAM,IAAIG,KAAA,CACR,oBAAoBF,iBAAiB,QAAQH,KAAK,MAAMC,QAAQ,MAAMC,MAAM,EAC9E;EACJ;AACF;AAEO,SAASI,mBAAmBC,MAAA,EAAoC;EACrEX,WAAA,GAAc,IAAIC,IAAA,CAAKC,WAAA,CAAYS,MAAM;AAC3C","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/url/urlSanitize.ts"],
|
|
4
|
-
"mappings": "AAOA,MAAM,YAAY,oBAAI,IAAI,CAAC,SAAS,UAAU,WAAW,QAAQ,MAAM,CAAC;AAEjE,SAAS,YAAY,
|
|
4
|
+
"mappings": "AAOA,MAAM,YAAY,oBAAI,IAAI,CAAC,SAAS,UAAU,WAAW,QAAQ,MAAM,CAAC;AAEjE,SAAS,YAAY,KAAqB;AAC/C,MAAI;AACF,UAAM,YAAY,IAAI,IAAI,GAAG;AAC7B,QAAI,CAAC,UAAU,IAAI,UAAU,QAAQ;AACnC,aAAO;AAAA,EAEX,QAAQ;AACN,WAAO;AAAA,EACT;AACA,SAAO;AACT;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["protocols","Set","urlSanitize","url","parsedUrl","URL","has","protocol"],"sources":["../../../src/url/urlSanitize.ts"],"sourcesContent":[null],"mappings":"AAOA,MAAMA,SAAA,GAAY,mBAAIC,GAAA,CAAI,CAAC,SAAS,UAAU,WAAW,QAAQ,MAAM,CAAC;AAEjE,SAASC,YAAYC,GAAA,
|
|
1
|
+
{"version":3,"names":["protocols","Set","urlSanitize","url","parsedUrl","URL","has","protocol"],"sources":["../../../src/url/urlSanitize.ts"],"sourcesContent":[null],"mappings":"AAOA,MAAMA,SAAA,GAAY,mBAAIC,GAAA,CAAI,CAAC,SAAS,UAAU,WAAW,QAAQ,MAAM,CAAC;AAEjE,SAASC,YAAYC,GAAA,EAAqB;EAC/C,IAAI;IACF,MAAMC,SAAA,GAAY,IAAIC,GAAA,CAAIF,GAAG;IAC7B,IAAI,CAACH,SAAA,CAAUM,GAAA,CAAIF,SAAA,CAAUG,QAAQ,GACnC,OAAO;EAEX,QAAQ;IACN,OAAOJ,GAAA;EACT;EACA,OAAOA,GAAA;AACT","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/url/urlValidate.ts"],
|
|
4
|
-
"mappings": "AAEA,MAAM,YAAY,IAAI;AAAA,EACpB;AACF;AAEO,SAAS,YAAY,
|
|
4
|
+
"mappings": "AAEA,MAAM,YAAY,IAAI;AAAA,EACpB;AACF;AAEO,SAAS,YAAY,KAAsB;AAGhD,SAAO,QAAQ,cAAc,UAAU,KAAK,GAAG;AACjD;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["urlRegExp","RegExp","urlValidate","url","test"],"sources":["../../../src/url/urlValidate.ts"],"sourcesContent":[null],"mappings":"AAEA,MAAMA,SAAA,GAAY,IAAIC,MAAA,CACpB,4JACF;AAEO,SAASC,YAAYC,GAAA,
|
|
1
|
+
{"version":3,"names":["urlRegExp","RegExp","urlValidate","url","test"],"sources":["../../../src/url/urlValidate.ts"],"sourcesContent":[null],"mappings":"AAEA,MAAMA,SAAA,GAAY,IAAIC,MAAA,CACpB,4JACF;AAEO,SAASC,YAAYC,GAAA,EAAsB;EAGhD,OAAOA,GAAA,KAAQ,cAAcH,SAAA,CAAUI,IAAA,CAAKD,GAAG;AACjD","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@take-out/helpers",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.31",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"scripts": {
|
|
16
16
|
"build": "tamagui-build",
|
|
17
17
|
"watch": "tamagui-build --watch",
|
|
18
|
-
"typecheck": "
|
|
18
|
+
"typecheck": "tko run typecheck",
|
|
19
19
|
"lint": "biome check src",
|
|
20
20
|
"lint:fix": "biome check --write src",
|
|
21
21
|
"clean": "tamagui-build clean",
|
package/src/browser/openPopup.ts
CHANGED
|
@@ -5,7 +5,7 @@ export function openCenteredPopup(
|
|
|
5
5
|
title: string,
|
|
6
6
|
width: number,
|
|
7
7
|
height: number
|
|
8
|
-
) {
|
|
8
|
+
): Window | null {
|
|
9
9
|
// availWidth/availHeight accounts for taskbars, docks, and other UI elements
|
|
10
10
|
const screenWidth = screen.availWidth || screen.width
|
|
11
11
|
const screenHeight = screen.availHeight || screen.height
|
package/src/string/hash.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// simple reversible encoding - alphanumeric only
|
|
2
2
|
|
|
3
|
-
export function hashString(str: string) {
|
|
3
|
+
export function hashString(str: string): string {
|
|
4
4
|
// convert to hex (0-9a-f)
|
|
5
5
|
return str
|
|
6
6
|
.split('')
|
|
@@ -8,7 +8,7 @@ export function hashString(str: string) {
|
|
|
8
8
|
.join('')
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
export function unhashString(encoded: string) {
|
|
11
|
+
export function unhashString(encoded: string): string {
|
|
12
12
|
// convert from hex back to string
|
|
13
13
|
return (
|
|
14
14
|
encoded
|
package/src/string/pluralize.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
let pluralRules = new Intl.PluralRules('en-US')
|
|
2
2
|
|
|
3
|
-
export function pluralize(count: number, singular: string, plural: string) {
|
|
3
|
+
export function pluralize(count: number, singular: string, plural: string): string {
|
|
4
4
|
const grammaticalNumber = pluralRules.select(count)
|
|
5
5
|
switch (grammaticalNumber) {
|
|
6
6
|
case 'one':
|
|
@@ -14,7 +14,7 @@ export function pluralize(count: number, singular: string, plural: string) {
|
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
export function setPluralizeLocale(locale: Intl.LocalesArgument) {
|
|
17
|
+
export function setPluralizeLocale(locale: Intl.LocalesArgument): void {
|
|
18
18
|
pluralRules = new Intl.PluralRules(locale)
|
|
19
19
|
}
|
|
20
20
|
|
package/src/url/urlSanitize.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
const protocols = new Set(['http:', 'https:', 'mailto:', 'tel:', 'sms:'])
|
|
9
9
|
|
|
10
|
-
export function urlSanitize(url: string) {
|
|
10
|
+
export function urlSanitize(url: string): string {
|
|
11
11
|
try {
|
|
12
12
|
const parsedUrl = new URL(url)
|
|
13
13
|
if (!protocols.has(parsedUrl.protocol)) {
|
package/src/url/urlValidate.ts
CHANGED
|
@@ -4,7 +4,7 @@ const urlRegExp = new RegExp(
|
|
|
4
4
|
/((([A-Za-z]{3,9}:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)/
|
|
5
5
|
)
|
|
6
6
|
|
|
7
|
-
export function urlValidate(url: string) {
|
|
7
|
+
export function urlValidate(url: string): boolean {
|
|
8
8
|
// TODO Fix UI for link insertion; it should never default to an invalid URL such as https://.
|
|
9
9
|
// Maybe show a dialog where they user can type the URL before inserting it.
|
|
10
10
|
return url === 'https://' || urlRegExp.test(url)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// note safari enhanced privacy will break this as it reports screen height as smaller
|
|
2
|
-
export declare function openCenteredPopup(url: string, title: string, width: number, height: number);
|
|
2
|
+
export declare function openCenteredPopup(url: string, title: string, width: number, height: number): Window | null;
|
|
3
3
|
|
|
4
4
|
//# sourceMappingURL=openPopup.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"mappings": ";AAEA,OAAO,iBAAS,kBACdA,aACAC,eACAC,eACAC",
|
|
2
|
+
"mappings": ";AAEA,OAAO,iBAAS,kBACdA,aACAC,eACAC,eACAC,iBACC",
|
|
3
3
|
"names": [
|
|
4
4
|
"url: string",
|
|
5
5
|
"title: string",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"src/browser/openPopup.ts"
|
|
11
11
|
],
|
|
12
12
|
"sourcesContent": [
|
|
13
|
-
"// note safari enhanced privacy will break this as it reports screen height as smaller\n\nexport function openCenteredPopup(\n url: string,\n title: string,\n width: number,\n height: number\n) {\n // availWidth/availHeight accounts for taskbars, docks, and other UI elements\n const screenWidth = screen.availWidth || screen.width\n const screenHeight = screen.availHeight || screen.height\n\n const shouldGuess = screenHeight < height\n\n // if we are guessing, at least make it a bit more likely to be centered\n // and not just touching the top which looks broken\n const left = Math.max(0, (screenWidth - width) / 2) + (shouldGuess ? 100 : 0)\n const top = Math.max(150, shouldGuess ? 150 : Math.max(0, (screenHeight - height) / 2))\n\n const windowFeatures = `\n width=${width},\n height=${height},\n left=${left},\n top=${top},\n scrollbars=yes,\n resizable=yes\n `\n\n return window.open(url, title, windowFeatures)\n}\n"
|
|
13
|
+
"// note safari enhanced privacy will break this as it reports screen height as smaller\n\nexport function openCenteredPopup(\n url: string,\n title: string,\n width: number,\n height: number\n): Window | null {\n // availWidth/availHeight accounts for taskbars, docks, and other UI elements\n const screenWidth = screen.availWidth || screen.width\n const screenHeight = screen.availHeight || screen.height\n\n const shouldGuess = screenHeight < height\n\n // if we are guessing, at least make it a bit more likely to be centered\n // and not just touching the top which looks broken\n const left = Math.max(0, (screenWidth - width) / 2) + (shouldGuess ? 100 : 0)\n const top = Math.max(150, shouldGuess ? 150 : Math.max(0, (screenHeight - height) / 2))\n\n const windowFeatures = `\n width=${width},\n height=${height},\n left=${left},\n top=${top},\n scrollbars=yes,\n resizable=yes\n `\n\n return window.open(url, title, windowFeatures)\n}\n"
|
|
14
14
|
],
|
|
15
15
|
"version": 3
|
|
16
16
|
}
|
package/types/string/hash.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// simple reversible encoding - alphanumeric only
|
|
2
|
-
export declare function hashString(str: string);
|
|
3
|
-
export declare function unhashString(encoded: string);
|
|
2
|
+
export declare function hashString(str: string): string;
|
|
3
|
+
export declare function unhashString(encoded: string): string;
|
|
4
4
|
|
|
5
5
|
//# sourceMappingURL=hash.d.ts.map
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"src/string/hash.ts"
|
|
9
9
|
],
|
|
10
10
|
"sourcesContent": [
|
|
11
|
-
"// simple reversible encoding - alphanumeric only\n\nexport function hashString(str: string) {\n // convert to hex (0-9a-f)\n return str\n .split('')\n .map((c) => c.charCodeAt(0).toString(16).padStart(2, '0'))\n .join('')\n}\n\nexport function unhashString(encoded: string) {\n // convert from hex back to string\n return (\n encoded\n .match(/.{2}/g)\n ?.map((h) => String.fromCharCode(parseInt(h, 16)))\n .join('') || ''\n )\n}\n"
|
|
11
|
+
"// simple reversible encoding - alphanumeric only\n\nexport function hashString(str: string): string {\n // convert to hex (0-9a-f)\n return str\n .split('')\n .map((c) => c.charCodeAt(0).toString(16).padStart(2, '0'))\n .join('')\n}\n\nexport function unhashString(encoded: string): string {\n // convert from hex back to string\n return (\n encoded\n .match(/.{2}/g)\n ?.map((h) => String.fromCharCode(parseInt(h, 16)))\n .join('') || ''\n )\n}\n"
|
|
12
12
|
],
|
|
13
13
|
"version": 3
|
|
14
14
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export declare function pluralize(count: number, singular: string, plural: string);
|
|
2
|
-
export declare function setPluralizeLocale(locale: Intl.LocalesArgument);
|
|
1
|
+
export declare function pluralize(count: number, singular: string, plural: string): string;
|
|
2
|
+
export declare function setPluralizeLocale(locale: Intl.LocalesArgument): void;
|
|
3
3
|
export type PluralizeFn = typeof pluralize;
|
|
4
4
|
|
|
5
5
|
//# sourceMappingURL=pluralize.d.ts.map
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"src/string/pluralize.ts"
|
|
11
11
|
],
|
|
12
12
|
"sourcesContent": [
|
|
13
|
-
"let pluralRules = new Intl.PluralRules('en-US')\n\nexport function pluralize(count: number, singular: string, plural: string) {\n const grammaticalNumber = pluralRules.select(count)\n switch (grammaticalNumber) {\n case 'one':\n return `${count} ${singular}`\n case 'other':\n return `${count} ${plural}`\n default:\n throw new Error(\n `Can't pluralize: ${grammaticalNumber} for ${count} / ${singular} / ${plural}`\n )\n }\n}\n\nexport function setPluralizeLocale(locale: Intl.LocalesArgument) {\n pluralRules = new Intl.PluralRules(locale)\n}\n\nexport type PluralizeFn = typeof pluralize\n"
|
|
13
|
+
"let pluralRules = new Intl.PluralRules('en-US')\n\nexport function pluralize(count: number, singular: string, plural: string): string {\n const grammaticalNumber = pluralRules.select(count)\n switch (grammaticalNumber) {\n case 'one':\n return `${count} ${singular}`\n case 'other':\n return `${count} ${plural}`\n default:\n throw new Error(\n `Can't pluralize: ${grammaticalNumber} for ${count} / ${singular} / ${plural}`\n )\n }\n}\n\nexport function setPluralizeLocale(locale: Intl.LocalesArgument): void {\n pluralRules = new Intl.PluralRules(locale)\n}\n\nexport type PluralizeFn = typeof pluralize\n"
|
|
14
14
|
],
|
|
15
15
|
"version": 3
|
|
16
16
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"src/url/urlSanitize.ts"
|
|
8
8
|
],
|
|
9
9
|
"sourcesContent": [
|
|
10
|
-
"/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst protocols = new Set(['http:', 'https:', 'mailto:', 'tel:', 'sms:'])\n\nexport function urlSanitize(url: string) {\n try {\n const parsedUrl = new URL(url)\n if (!protocols.has(parsedUrl.protocol)) {\n return 'about:blank'\n }\n } catch {\n return url\n }\n return url\n}\n"
|
|
10
|
+
"/**\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n */\nconst protocols = new Set(['http:', 'https:', 'mailto:', 'tel:', 'sms:'])\n\nexport function urlSanitize(url: string): string {\n try {\n const parsedUrl = new URL(url)\n if (!protocols.has(parsedUrl.protocol)) {\n return 'about:blank'\n }\n } catch {\n return url\n }\n return url\n}\n"
|
|
11
11
|
],
|
|
12
12
|
"version": 3
|
|
13
13
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"src/url/urlValidate.ts"
|
|
8
8
|
],
|
|
9
9
|
"sourcesContent": [
|
|
10
|
-
"// Source: https://stackoverflow.com/a/8234912/2013580\n\nconst urlRegExp = new RegExp(\n /((([A-Za-z]{3,9}:(?:\\/\\/)?)(?:[-;:&=+$,\\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\\w]+@)[A-Za-z0-9.-]+)((?:\\/[+~%/.\\w-_]*)?\\??(?:[-+=&;%@.\\w_]*)#?(?:[\\w]*))?)/\n)\n\nexport function urlValidate(url: string) {\n // TODO Fix UI for link insertion; it should never default to an invalid URL such as https://.\n // Maybe show a dialog where they user can type the URL before inserting it.\n return url === 'https://' || urlRegExp.test(url)\n}\n"
|
|
10
|
+
"// Source: https://stackoverflow.com/a/8234912/2013580\n\nconst urlRegExp = new RegExp(\n /((([A-Za-z]{3,9}:(?:\\/\\/)?)(?:[-;:&=+$,\\w]+@)?[A-Za-z0-9.-]+|(?:www.|[-;:&=+$,\\w]+@)[A-Za-z0-9.-]+)((?:\\/[+~%/.\\w-_]*)?\\??(?:[-+=&;%@.\\w_]*)#?(?:[\\w]*))?)/\n)\n\nexport function urlValidate(url: string): boolean {\n // TODO Fix UI for link insertion; it should never default to an invalid URL such as https://.\n // Maybe show a dialog where they user can type the URL before inserting it.\n return url === 'https://' || urlRegExp.test(url)\n}\n"
|
|
11
11
|
],
|
|
12
12
|
"version": 3
|
|
13
13
|
}
|