fullstack-phone 1.103.0 → 1.104.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 +5 -0
- package/README.md +4 -2
- package/package.json +2 -2
- package/server/metadata/metadata.json +6 -6
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@ fullstack-phone ☎️
|
|
|
3
3
|
|
|
4
4
|
| npm | Libphonenumber version |
|
|
5
5
|
| ------------------------------------------------------------ | ------------------------------------------------------------ |
|
|
6
|
-
| [](https://www.npmjs.com/package/fullstack-phone) | [v8.12.
|
|
6
|
+
| [](https://www.npmjs.com/package/fullstack-phone) | [v8.12.46](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
|
|
|
@@ -520,7 +520,9 @@ phoneHandler.inferPhoneNumberType({ countryCode: '44', nationalNumber: '999999'
|
|
|
520
520
|
|
|
521
521
|
Return the two letter region code associated with a valid `phoneObj`.
|
|
522
522
|
|
|
523
|
-
Returns `null` if the region cannot be determined. (This can happen if metadata has not been loaded for the region associated with the `phoneObj.countryCode`.
|
|
523
|
+
Returns `null` if the region cannot be determined. (This can happen if metadata has not been loaded for the region associated with the `phoneObj.countryCode`.)
|
|
524
|
+
|
|
525
|
+
**Important:** This method only guarantees correct results for **valid** phone numbers. ([See the libphonenumber source code.](https://github.com/google/libphonenumber/blob/5c309c56a945ffdf74f69aa4166b1ec5d7f233ff/javascript/i18n/phonenumbers/phonenumberutil.js#L3104-L3107))
|
|
524
526
|
|
|
525
527
|
```javascript
|
|
526
528
|
phoneHandler.inferPhoneNumberRegion({ countryCode: '44', nationalNumber: '1212345678' });
|
package/package.json
CHANGED
|
@@ -5820,7 +5820,7 @@
|
|
|
5820
5820
|
[
|
|
5821
5821
|
null,
|
|
5822
5822
|
null,
|
|
5823
|
-
"[25689]\\d{
|
|
5823
|
+
"(?:[25689]\\d|40)\\d{6}",
|
|
5824
5824
|
null,
|
|
5825
5825
|
null,
|
|
5826
5826
|
null,
|
|
@@ -5843,7 +5843,7 @@
|
|
|
5843
5843
|
[
|
|
5844
5844
|
null,
|
|
5845
5845
|
null,
|
|
5846
|
-
"(?:5[1-8]|6\\d|9[013-9])\\d{6}",
|
|
5846
|
+
"(?:40|5[1-8]|6\\d|9[013-9])\\d{6}",
|
|
5847
5847
|
null,
|
|
5848
5848
|
null,
|
|
5849
5849
|
null,
|
|
@@ -5930,7 +5930,7 @@
|
|
|
5930
5930
|
"(\\d{2})(\\d{2})(\\d{2})(\\d{2})",
|
|
5931
5931
|
"$1 $2 $3 $4",
|
|
5932
5932
|
[
|
|
5933
|
-
"[
|
|
5933
|
+
"[24-689]"
|
|
5934
5934
|
]
|
|
5935
5935
|
]
|
|
5936
5936
|
],
|
|
@@ -25215,7 +25215,7 @@
|
|
|
25215
25215
|
[
|
|
25216
25216
|
null,
|
|
25217
25217
|
null,
|
|
25218
|
-
"8766060\\d{3}|(?:658(?:2(?:[0-8]\\d|9[0-46-9])|[3-9]\\d\\d)|876(?:52[35]|6(?:0[1-3579]|1[
|
|
25218
|
+
"8766060\\d{3}|(?:658(?:2(?:[0-8]\\d|9[0-46-9])|[3-9]\\d\\d)|876(?:52[35]|6(?:0[1-3579]|1[02357-9]|[23]\\d|40|5[06]|6[2-589]|7[0257]|8[04]|9[4-9])|7(?:0[2-689]|[1-6]\\d|8[056]|9[45])|9(?:0[1-8]|1[02378]|[2-8]\\d|9[2-468])))\\d{4}",
|
|
25219
25219
|
null,
|
|
25220
25220
|
null,
|
|
25221
25221
|
null,
|
|
@@ -41618,7 +41618,7 @@
|
|
|
41618
41618
|
[
|
|
41619
41619
|
null,
|
|
41620
41620
|
null,
|
|
41621
|
-
"(?:46[0-5]|6[2-4689]0)\\d{4}|(?:45|77|88)\\d{5}",
|
|
41621
|
+
"(?:(?:46|83)[0-5]|6[2-4689]0)\\d{4}|(?:45|77|88)\\d{5}",
|
|
41622
41622
|
null,
|
|
41623
41623
|
null,
|
|
41624
41624
|
null,
|
|
@@ -43533,7 +43533,7 @@
|
|
|
43533
43533
|
[
|
|
43534
43534
|
null,
|
|
43535
43535
|
null,
|
|
43536
|
-
"579[01]\\d{5}|5(?:[013-689]\\d|7[0-
|
|
43536
|
+
"579[01]\\d{5}|5(?:[013-689]\\d|7[0-35-8])\\d{6}",
|
|
43537
43537
|
null,
|
|
43538
43538
|
null,
|
|
43539
43539
|
null,
|