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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libphonenumber-js",
3
- "version": "1.9.21",
3
+ "version": "1.9.25",
4
4
  "description": "A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript",
5
5
  "main": "index.common.js",
6
6
  "module": "index.es6.js",
@@ -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
- formatter = new AsYouType()
366
- formatter.input('+78800555353').should.equal('+7 880 055 53 53')
367
- formatter.input('5').should.equal('+7 8 800 555 35 35')
368
- formatter.getNationalNumber().should.equal('8005553535')
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('88005553535')
928
+ formatter.input('89991112233')
927
929
  formatter.formatter.chosenFormat.format().should.equal('$1 $2-$3-$4')
928
930
  formatter.reset()
929
- formatter.input('880055535355')
931
+ formatter.input('899911122334')
930
932
  expect(formatter.formatter.chosenFormat).to.be.undefined
931
933
  })
932
934
 
@@ -119,10 +119,10 @@ describe('parse', () => {
119
119
  })
120
120
 
121
121
  // Too long.
122
- parseNumber('+7 (800) 55-35-35-555', { extended: true }).should.deep.equal({
122
+ parseNumber('+1 213 37342530', { extended: true }).should.deep.equal({
123
123
  country : undefined,
124
- countryCallingCode : '7',
125
- phone : '00553535555',
124
+ countryCallingCode : '1',
125
+ phone : '21337342530',
126
126
  carrierCode : undefined,
127
127
  ext : undefined,
128
128
  valid : false,