libphonenumber-js 1.13.2 → 1.13.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.
package/CHANGELOG.md CHANGED
@@ -67,8 +67,21 @@ And edit the README:
67
67
 
68
68
  <!-- This changelog [only](https://gitlab.com/catamphetamine/libphonenumber-js/-/issues/16#note_594165443) mentions the changes in the code. See [Google's changelog](https://github.com/google/libphonenumber/blob/master/release_notes.txt) for metadata changes. -->
69
69
 
70
- <!-- CHANGELOG START -->
71
-
70
+ <!-- CHANGELOG START -->
71
+
72
+ 1.13.3 / 22.5.2026
73
+ ===================
74
+
75
+ * Updated metadata to version 9.0.31:
76
+ - Updated alternate formatting data for country calling code(s): 84
77
+ - Updated phone metadata for region code(s):
78
+ AI, BO, DZ, ET, GE, GM, IN, TR, UG, VN
79
+ - Updated short number metadata for region code(s): IT
80
+ - Updated geocoding data for country calling code(s): 213 (en)
81
+ - Updated carrier data for country calling code(s):
82
+ 34 (en), 43 (en), 84 (en), 90 (en), 220 (en), 251 (en), 256 (en), 354 (en),
83
+ 591 (en), 1264 (en)
84
+
72
85
  1.13.0 / 08.05.2026
73
86
  ===================
74
87
 
package/README.md CHANGED
@@ -237,26 +237,17 @@ new AsYouType('US').input('2133734') === '(213) 373-4'
237
237
  Validates a complete phone number.
238
238
 
239
239
  ```js
240
- import {
241
- isPossiblePhoneNumber,
242
- isValidPhoneNumber,
243
- validatePhoneNumberLength
244
- } from 'libphonenumber-js'
240
+ import { isPossiblePhoneNumber, isValidPhoneNumber } from 'libphonenumber-js'
245
241
 
246
242
  isPossiblePhoneNumber('8 (800) 555-35-35', 'RU') === true
247
243
  isValidPhoneNumber('8 (800) 555-35-35', 'RU') === true
248
-
249
- validatePhoneNumberLength('8 (800) 555', 'RU') === 'TOO_SHORT' // Length is invalid
250
- validatePhoneNumberLength('8 (800) 555-35-35', 'RU') === undefined // Length is valid
251
244
  ```
252
245
 
253
246
  `isPossiblePhoneNumber()` validates phone number length.
254
247
 
255
248
  `isValidPhoneNumber()` validates both phone number length and phone number digits.
256
249
 
257
- It may seem counter-intuitive but when [choosing between the two](#using-phone-number-validation-feature), I'd personally prefer `isPossiblePhoneNumber()` because its strength is in its weakness. `isValidPhoneNumber()` is a double-edged sword in terms of how strict it is, and when not updated regularly, it could get stale over time and start rejecting freshly-assigned phone number ranges.
258
-
259
- As for `validatePhoneNumberLength()`, is just a more detailed version of `isPossiblePhoneNumber()` for those who need it — when the phone number length is invalid, instead of returning just `false`, it returns the actual reason why the phone number length is incorrect: `TOO_SHORT`, `TOO_LONG`, etc.
250
+ [Choosing between the two](#using-phone-number-validation-feature): I'd personally prefer `isPossiblePhoneNumber()` because its strength is in its weakness. `isValidPhoneNumber()` is a double-edged sword in terms of how strict it is, and when not kept up-to-date, it could get stale over time and start rejecting freshly-assigned phone number ranges.
260
251
 
261
252
  ### Full-text search
262
253