fullstack-phone 1.168.0 → 1.169.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.169.0
4
+
5
+ * Metadata:
6
+ * Updated to libphonenumber v8.13.53
7
+
3
8
  ## 1.168.0
4
9
 
5
10
  * Metadata:
package/README.md CHANGED
@@ -3,7 +3,7 @@ fullstack-phone ☎️
3
3
 
4
4
  | npm | Libphonenumber version |
5
5
  | ------------------------------------------------------------ | ------------------------------------------------------------ |
6
- | [![npm version](https://badge.fury.io/js/fullstack-phone.svg)](https://www.npmjs.com/package/fullstack-phone) | [v8.13.52](https://github.com/googlei18n/libphonenumber/blob/master/release_notes.txt) |
6
+ | [![npm version](https://badge.fury.io/js/fullstack-phone.svg)](https://www.npmjs.com/package/fullstack-phone) | [v8.13.53](https://github.com/googlei18n/libphonenumber/blob/master/release_notes.txt) |
7
7
 
8
8
  **fullstack-phone** provides formatting, validation, and parsing of phone numbers per-region. The system is optimized for use as two modules:
9
9
 
package/client/index.js CHANGED
@@ -76,7 +76,7 @@ function ub(a,b,c){if(null==b)throw Error("The string supplied did not seem to b
76
76
  null!=e?("+"===e.charAt(0)&&d.g(e),e=b.indexOf("tel:"),d.g(b.substring(0<=e?e+4:0,b.indexOf(";phone-context=")))):(e=d.g,b=null!=b?b:"",f=b.search(Sa),0<=f?(b=b.substring(f),b=b.replace(Ua,""),f=b.search(Ta),0<=f&&(b=b.substring(0,f))):b="",e.call(d,b));b=d.toString();e=b.indexOf(";isub=");0<e&&(n(d),d.g(b.substring(0,e)));if(!cb(d.toString()))throw Error("The string supplied did not seem to be a phone number");b=d.toString();if(!(K(c)||null!=b&&0<b.length&&H.test(b)))throw Error("Invalid country calling code");
77
77
  b=new D;a:{e=d.toString();f=e.search(Za);if(0<=f&&cb(e.substring(0,f))){g=e.match(Za);for(var k=g.length,m=1;m<k;++m)if(null!=g[m]&&0<g[m].length){n(d);d.g(e.substring(0,f));e=g[m];break a}}e=""}0<e.length&&t(b,3,e);f=Q(a,c);e=new l;g=0;k=d.toString();try{g=sb(a,k,f,e,b)}catch(M){if("Invalid country calling code"==M.message&&H.test(k)){if(k=k.replace(H,""),g=sb(a,k,f,e,b),0==g)throw M;}else throw M;}0!=g?(d=P(g),d!=c&&(f=O(a,g,d))):(fb(d),e.g(d.toString()),null!=c&&(g=w(f,10),t(b,1,g)));if(2>e.h.length)throw Error("The string supplied is too short to be a phone number");
78
78
  null!=f&&(c=new l(e.toString()),tb(c,f,new l),a=pb(a,c.toString(),f,-1),2!=a&&4!=a&&5!=a&&(e=c));a=e.toString();c=a.length;if(2>c)throw Error("The string supplied is too short to be a phone number");if(17<c)throw Error("The string supplied is too long to be a phone number");if(1<a.length&&"0"==a.charAt(0)){t(b,4,!0);for(c=1;c<a.length-1&&"0"==a.charAt(c);)c++;1!=c&&t(b,8,c)}t(b,2,parseInt(a,10));return b}
79
- function J(a,b){return(a="string"==typeof a?b.match("^(?:"+a+")$"):b.match(a))&&a[0].length==b.length?!0:!1};function vb(a){this.ia=RegExp("\u2008");this.da="";this.aa=new l;this.ea="";this.o=new l;this.$=new l;this.v=!0;this.fa=this.ba=this.la=!1;this.na=G.h();this.oa=this.ma=this.ca=0;this.h=new l;this.ha=!1;this.s="";this.g=new l;this.j=[];this.ja=a;this.pa=this.l=wb(this,this.ja)}var xb=new B;t(xb,11,"NA");
79
+ function J(a,b){return(a=b.match(new RegExp("^(?:"+("string"==typeof a?a:a.source)+")$","i")))&&a[0].length==b.length?!0:!1};function vb(a){this.ia=RegExp("\u2008");this.da="";this.aa=new l;this.ea="";this.o=new l;this.$=new l;this.v=!0;this.fa=this.ba=this.la=!1;this.na=G.h();this.oa=this.ma=this.ca=0;this.h=new l;this.ha=!1;this.s="";this.g=new l;this.j=[];this.ja=a;this.pa=this.l=wb(this,this.ja)}var xb=new B;t(xb,11,"NA");
80
80
  var yb=RegExp("^[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e]*\\$1[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e]*(\\$\\d[-x\u2010-\u2015\u2212\u30fc\uff0d-\uff0f \u00a0\u00ad\u200b\u2060\u3000()\uff08\uff09\uff3b\uff3d.\\[\\]/~\u2053\u223c\uff5e]*)*$"),zb=/[- ]/;function wb(a,b){b=K(b)?S(a.na,b):0;a=Q(a.na,P(b));return null!=a?a:xb}
81
81
  function Ab(a){for(var b=a.j.length,c=0;c<b;++c){var d=a.j[c],e=w(d,1);if(a.ea==e)return!1;var f=a;var g=d,k=w(g,1);n(f.aa);var m=f;g=w(g,2);var M="999999999999999".match(k)[0];M.length<m.g.h.length?m="":(m=M.replace(new RegExp(k,"g"),g),m=m.replace(RegExp("9","g"),"\u2008"));0<m.length?(f.aa.g(m),f=!0):f=!1;if(f)return a.ea=e,a.ha=zb.test(r(d,4)),a.ca=0,!0}return a.v=!1}
82
82
  function Bb(a,b){for(var c=[],d=b.length-3,e=a.j.length,f=0;f<e;++f){var g=a.j[f];0==x(g,3)?c.push(a.j[f]):(g=r(g,3,Math.min(d,x(g,3)-1)),0==b.search(g)&&c.push(a.j[f]))}a.j=c}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "fullstack-phone",
3
- "version": "1.168.0",
4
- "libphonenumber": "v8.13.52",
3
+ "version": "1.169.0",
4
+ "libphonenumber": "v8.13.53",
5
5
  "description": "A dual-module phone number system with dynamic regional metadata",
6
6
  "keywords": [
7
7
  "libphonenumber",
@@ -15203,7 +15203,7 @@
15203
15203
  [
15204
15204
  null,
15205
15205
  null,
15206
- "(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}",
15206
+ "(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-467]|5[0-3]|8[0-5]))\\d{6}",
15207
15207
  null,
15208
15208
  null,
15209
15209
  null,
@@ -23090,7 +23090,7 @@
23090
23090
  [
23091
23091
  null,
23092
23092
  null,
23093
- "7(?:38(?:0\\d|5[0-2569]|88)|8(?:33|55|77|81)\\d)\\d{4}|7(?:18|2[23]|3[237]|47|6[258]|7\\d|82|9[2-9])\\d{6}",
23093
+ "7(?:38(?:0\\d|5[0-3569]|88)|8(?:33|55|77|81)\\d)\\d{4}|7(?:18|2[23]|3[237]|47|6[258]|7\\d|82|9[2-9])\\d{6}",
23094
23094
  null,
23095
23095
  null,
23096
23096
  null,
@@ -30722,7 +30722,7 @@
30722
30722
  [
30723
30723
  null,
30724
30724
  null,
30725
- "23(?:23[0-57-9]|33[0238])\\d{3}|2(?:[0-24-9]\\d\\d|3(?:0[07]|[14-9]\\d|2[024-9]|3[0-24-9]))\\d{4}",
30725
+ "2333[0-8]\\d{3}|2(?:[0-24-9]\\d\\d|3(?:0[07]|[14-9]\\d|2[02-9]|3[0-24-9]))\\d{4}",
30726
30726
  null,
30727
30727
  null,
30728
30728
  null,
@@ -31113,7 +31113,7 @@
31113
31113
  [
31114
31114
  null,
31115
31115
  null,
31116
- "(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-4]|5[01]|8[0-3]))\\d{6}",
31116
+ "(?:6(?:[0-79]\\d|8[0-247-9])|7(?:[0167]\\d|2[0-467]|5[0-3]|8[0-5]))\\d{6}",
31117
31117
  null,
31118
31118
  null,
31119
31119
  null,
@@ -32570,7 +32570,7 @@
32570
32570
  [
32571
32571
  null,
32572
32572
  null,
32573
- "7(?:3555|(?:474|9[019]7)7)\\d{3}|7(?:[0-25-8]\\d\\d|3(?:[1-48]\\d|6[01]|7[01578])|4(?:2\\d|60|7[01578])|9(?:[2-4]\\d|5[01]|7[015]))\\d{4}",
32573
+ "7(?:3555|(?:474|9[019]7)7)\\d{3}|7(?:[0-25-8]\\d\\d|3(?:[1-478]\\d|6[01])|4(?:2\\d|60|7[01578])|9(?:[2-4]\\d|5[01]|7[015]))\\d{4}",
32574
32574
  null,
32575
32575
  null,
32576
32576
  null,
@@ -33065,7 +33065,7 @@
33065
33065
  [
33066
33066
  null,
33067
33067
  null,
33068
- "1333\\d{4}|[12]468\\d{4}",
33068
+ "1333\\d{4}",
33069
33069
  null,
33070
33070
  null,
33071
33071
  null,
@@ -34674,7 +34674,7 @@
34674
34674
  [
34675
34675
  null,
34676
34676
  null,
34677
- "(?:2(?:[0346-8]\\d|1[0-7])|4(?:[013568]\\d|2[4-8]|71)|54(?:[3-5]\\d|71)|6\\d\\d|8(?:14|3[129]))\\d{4}",
34677
+ "(?:2(?:[0346-8]\\d|1[0-7])|4(?:[013568]\\d|2[4-8]|71|90)|54(?:[3-5]\\d|71)|6\\d\\d|8(?:14|3[129]))\\d{4}",
34678
34678
  null,
34679
34679
  null,
34680
34680
  null,
@@ -41664,7 +41664,7 @@
41664
41664
  [
41665
41665
  null,
41666
41666
  null,
41667
- "(?:(?:46|83)[0-5]|6[2-4689]0)\\d{4}|(?:45|77|88)\\d{5}",
41667
+ "(?:(?:46|83)[0-5]|(?:6[2-4689]|78)0)\\d{4}|(?:45|77|88)\\d{5}",
41668
41668
  null,
41669
41669
  null,
41670
41670
  null,
@@ -46676,7 +46676,7 @@
46676
46676
  [
46677
46677
  null,
46678
46678
  null,
46679
- "(?:(?:15|(?:3[59]|4[89]|6\\d|7[79]|8[08])\\d|9(?:0\\d|[2-9]))\\d|2(?:4\\d|8))\\d{5}|(?:[67]\\d\\d|904)\\d{5}",
46679
+ "(?:(?:15|(?:3[59]|4[89]|6\\d|7[679]|8[08])\\d|9(?:0\\d|[2-9]))\\d|2(?:4\\d|8))\\d{5}|(?:[67]\\d\\d|904)\\d{5}",
46680
46680
  null,
46681
46681
  null,
46682
46682
  null,
@@ -46815,7 +46815,7 @@
46815
46815
  "(\\d{2})(\\d{5,7})",
46816
46816
  "$1 $2",
46817
46817
  [
46818
- "1|28|6[0-35-9]|77|9[2-9]"
46818
+ "1|28|6[0-35-9]|7[67]|9[2-9]"
46819
46819
  ]
46820
46820
  ]
46821
46821
  ],