@vtex/phone
Advanced tools
Comparing version 4.10.4 to 4.10.5
@@ -10,2 +10,6 @@ # Changelog | ||
## [4.10.5] - 2021-08-31 | ||
- Add North American Numbering Plan for National Destination Code | ||
## [4.10.4] - 2021-07-27 | ||
@@ -12,0 +16,0 @@ ### Fixed |
@@ -17,3 +17,3 @@ (function() { | ||
this.countryCode = '1'; | ||
this.regex = /^(?:(?:(?:\+|)(?:1|))|)(?:1|)(?:2(?:0[1-9]|1[02-9]|2[03-9]|3[1469]|4[089]|5[01-46]|6[0279]|7[02469]|8[139])|3(?:0[1-9]|1[02-9]|2[01-35-7]|3[0124679]|4[01367]|5[12]|6[013457]|8[056])|4(?:0[1-9]|1[02-9]|2[345]|3[0-24578]|4[023578]|5[08]|6[349]|7[0589]|8[04]|50[1-57-9])|5(?:0[1-9]|1[02-9]|20|3[0149]|4[018]|5[179]|6[1-47]|7[0-59]|8[012567])|6(?:0[01-9]|1[0234-9]|2[023689]|3[0169]|4[0167]|5[01679]|6[01279]|7[01289]|8[01249])|7(?:0[1-9]|1[02-9]|2[04-7]|3[01247]|4[037]|5[47]|6[02359]|7[02-589]|8[012567])|8(?:0[1-8]|1[0-9]|2[0568]|3[0-289]|4[03578]|5[046-9]|6[02-57]|7[0238])|9(?:0[1-9]|1[02-9]|2[0589]|3[0146-9]|4[01579]|5[12469]|7[0-3589]|8[04-69]))\d{7}$/; | ||
this.regex = /^(?:(?:(?:\+|)(?:1|))|)(?:1|)(?:2(?:0[1-9]|1[02-9]|2[03-9]|3[1469]|4[089]|5[01-46]|6[0279]|7[02469]|8[139])|3(?:0[1-9]|1[02-9]|2[01-35-7]|3[0124679]|4[01367]|5[12]|6[013457]|8[056])|4(?:0[1-9]|1[02-9]|2[345]|3[0-24578]|4[023578]|5[08]|6[349]|7[0589]|8[04]|50[1-57-9])|5(?:0[1-9]|1[02-9]|20|3[0149]|4[018]|5[179]|6[1-47]|7[0-59]|8[012567])|6(?:0[01-9]|1[0234-9]|2[023689]|3[0169]|4[0167]|5[01679]|6[01279]|7[01289]|8[01249])|7(?:0[1-9]|1[02-9]|2[04-7]|3[01247]|4[037]|5[47]|6[02359]|7[02-589]|8[012567])|8(?:0[0-8]|1[0-9]|2[0568]|3[0-389]|4[03-578]|5[04-9]|6[02-7]|7[02378]|88)|9(?:0[1-9]|1[02-9]|2[0589]|3[0146-9]|4[01579]|5[12469]|7[0-3589]|8[04-69]))\d{7}$/; | ||
this.optionalTrunkPrefix = '1'; | ||
@@ -28,3 +28,4 @@ this.nationalNumberSeparator = ' '; | ||
this.virNationalDestinationCode = ['340']; | ||
this.nationalDestinationCode = this.usaNationalDestinationCode.concat(this.canadaNationalDestinationCode, this.asmNationalDestinationCode, this.gumNationalDestinationCode, this.mnpNationalDestinationCode, this.priNationalDestinationCode, this.virNationalDestinationCode); | ||
this.northAmericaNumberingPlanDestinationCode = ['800', '833', '844', '855', '866', '877', '888']; | ||
this.nationalDestinationCode = this.usaNationalDestinationCode.concat(this.canadaNationalDestinationCode, this.asmNationalDestinationCode, this.gumNationalDestinationCode, this.mnpNationalDestinationCode, this.priNationalDestinationCode, this.virNationalDestinationCode, this.northAmericaNumberingPlanDestinationCode); | ||
} | ||
@@ -31,0 +32,0 @@ |
{ | ||
"name": "@vtex/phone", | ||
"description": "front.phone is a Javascript library that identifies, validates and formats phone numbers", | ||
"version": "4.10.4", | ||
"version": "4.10.5", | ||
"paths": [ | ||
@@ -6,0 +6,0 @@ "/front.phone" |
83268
1395