libphonenumber-js 1.9.21 → 1.9.25
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/README.md +49 -0
- package/build/AsYouType.test.js +8 -7
- package/build/AsYouType.test.js.map +1 -1
- package/build/parse.test.js +3 -3
- package/build/parse.test.js.map +1 -1
- package/bundle/libphonenumber-js.min.js +1 -1
- package/bundle/libphonenumber-js.min.js.map +1 -1
- package/bundle/libphonenumber-max.js +1 -1
- package/bundle/libphonenumber-max.js.map +1 -1
- package/bundle/libphonenumber-min.js +1 -1
- package/bundle/libphonenumber-min.js.map +1 -1
- package/bundle/libphonenumber-mobile.js +1 -1
- package/bundle/libphonenumber-mobile.js.map +1 -1
- package/es6/AsYouType.test.js +8 -7
- package/es6/AsYouType.test.js.map +1 -1
- package/es6/parse.test.js +3 -3
- package/es6/parse.test.js.map +1 -1
- package/metadata.full.json +1 -1
- package/metadata.full.json.js +1 -1
- package/metadata.min.json +1 -1
- package/metadata.min.json.js +1 -1
- package/metadata.mobile.json +1 -1
- package/metadata.mobile.json.js +1 -1
- package/package.json +1 -1
- package/source/AsYouType.test.js +8 -6
- package/source/parse.test.js +3 -3
package/package.json
CHANGED
package/source/AsYouType.test.js
CHANGED
|
@@ -362,10 +362,12 @@ describe('AsYouType', () => {
|
|
|
362
362
|
// formatter.input('+1 1 877 215 5230').should.equal('+1 1 8772155230')
|
|
363
363
|
formatter.getNationalNumber().should.equal('8772155230')
|
|
364
364
|
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
formatter
|
|
368
|
-
formatter.
|
|
365
|
+
// They've added another number format that has `8` leading digit
|
|
366
|
+
// and 14 digits. Maybe it's something related to Kazakhstan.
|
|
367
|
+
// formatter = new AsYouType()
|
|
368
|
+
// formatter.input('+78800555353').should.equal('+7 880 055 53 53')
|
|
369
|
+
// formatter.input('5').should.equal('+7 8 800 555 35 35')
|
|
370
|
+
// formatter.getNationalNumber().should.equal('8005553535')
|
|
369
371
|
})
|
|
370
372
|
|
|
371
373
|
it('should return a partial template for current value', () => {
|
|
@@ -923,10 +925,10 @@ describe('AsYouType', () => {
|
|
|
923
925
|
|
|
924
926
|
it('shouldn\'t choose a format when there\'re too many digits for any of them', () => {
|
|
925
927
|
const formatter = new AsYouType('RU')
|
|
926
|
-
formatter.input('
|
|
928
|
+
formatter.input('89991112233')
|
|
927
929
|
formatter.formatter.chosenFormat.format().should.equal('$1 $2-$3-$4')
|
|
928
930
|
formatter.reset()
|
|
929
|
-
formatter.input('
|
|
931
|
+
formatter.input('899911122334')
|
|
930
932
|
expect(formatter.formatter.chosenFormat).to.be.undefined
|
|
931
933
|
})
|
|
932
934
|
|
package/source/parse.test.js
CHANGED
|
@@ -119,10 +119,10 @@ describe('parse', () => {
|
|
|
119
119
|
})
|
|
120
120
|
|
|
121
121
|
// Too long.
|
|
122
|
-
parseNumber('+
|
|
122
|
+
parseNumber('+1 213 37342530', { extended: true }).should.deep.equal({
|
|
123
123
|
country : undefined,
|
|
124
|
-
countryCallingCode : '
|
|
125
|
-
phone : '
|
|
124
|
+
countryCallingCode : '1',
|
|
125
|
+
phone : '21337342530',
|
|
126
126
|
carrierCode : undefined,
|
|
127
127
|
ext : undefined,
|
|
128
128
|
valid : false,
|