Socket
Socket
Sign inDemoInstall

libphonenumber-js

Package Overview
Dependencies
Maintainers
1
Versions
392
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

libphonenumber-js - npm Package Compare versions

Comparing version 1.9.22 to 1.9.23

15

build/AsYouType.test.js

@@ -322,7 +322,8 @@ "use strict";

formatter.getNationalNumber().should.equal('8772155230');
formatter = new AsYouType();
formatter.input('+78800555353').should.equal('+7 880 055 53 53');
formatter.input('5').should.equal('+7 8 800 555 35 35');
formatter.getNationalNumber().should.equal('8005553535');
formatter.getNationalNumber().should.equal('8772155230'); // They've added another number format that has `8` leading digit
// and 14 digits. Maybe it's something related to Kazakhstan.
// formatter = new AsYouType()
// formatter.input('+78800555353').should.equal('+7 880 055 53 53')
// formatter.input('5').should.equal('+7 8 800 555 35 35')
// formatter.getNationalNumber().should.equal('8005553535')
});

@@ -819,6 +820,6 @@ it('should return a partial template for current value', function () {

var formatter = new AsYouType('RU');
formatter.input('88005553535');
formatter.input('89991112233');
formatter.formatter.chosenFormat.format().should.equal('$1 $2-$3-$4');
formatter.reset();
formatter.input('880055535355');
formatter.input('899911122334');
expect(formatter.formatter.chosenFormat).to.be.undefined;

@@ -825,0 +826,0 @@ });

@@ -164,8 +164,8 @@ "use strict";

parseNumber('+7 (800) 55-35-35-555', {
parseNumber('+1 213 37342530', {
extended: true
}).should.deep.equal({
country: undefined,
countryCallingCode: '7',
phone: '00553535555',
countryCallingCode: '1',
phone: '21337342530',
carrierCode: undefined,

@@ -172,0 +172,0 @@ ext: undefined,

@@ -317,7 +317,8 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }

formatter.getNationalNumber().should.equal('8772155230');
formatter = new AsYouType();
formatter.input('+78800555353').should.equal('+7 880 055 53 53');
formatter.input('5').should.equal('+7 8 800 555 35 35');
formatter.getNationalNumber().should.equal('8005553535');
formatter.getNationalNumber().should.equal('8772155230'); // They've added another number format that has `8` leading digit
// and 14 digits. Maybe it's something related to Kazakhstan.
// formatter = new AsYouType()
// formatter.input('+78800555353').should.equal('+7 880 055 53 53')
// formatter.input('5').should.equal('+7 8 800 555 35 35')
// formatter.getNationalNumber().should.equal('8005553535')
});

@@ -814,6 +815,6 @@ it('should return a partial template for current value', function () {

var formatter = new AsYouType('RU');
formatter.input('88005553535');
formatter.input('89991112233');
formatter.formatter.chosenFormat.format().should.equal('$1 $2-$3-$4');
formatter.reset();
formatter.input('880055535355');
formatter.input('899911122334');
expect(formatter.formatter.chosenFormat).to.be.undefined;

@@ -820,0 +821,0 @@ });

@@ -158,8 +158,8 @@ import metadata from '../metadata.min.json';

parseNumber('+7 (800) 55-35-35-555', {
parseNumber('+1 213 37342530', {
extended: true
}).should.deep.equal({
country: undefined,
countryCallingCode: '7',
phone: '00553535555',
countryCallingCode: '1',
phone: '21337342530',
carrierCode: undefined,

@@ -166,0 +166,0 @@ ext: undefined,

{
"name": "libphonenumber-js",
"version": "1.9.22",
"version": "1.9.23",
"description": "A simpler (and smaller) rewrite of Google Android's libphonenumber library in javascript",

@@ -5,0 +5,0 @@ "main": "index.common.js",

@@ -365,6 +365,8 @@ import metadata from '../metadata.min.json'

formatter = new AsYouType()
formatter.input('+78800555353').should.equal('+7 880 055 53 53')
formatter.input('5').should.equal('+7 8 800 555 35 35')
formatter.getNationalNumber().should.equal('8005553535')
// They've added another number format that has `8` leading digit
// and 14 digits. Maybe it's something related to Kazakhstan.
// formatter = new AsYouType()
// formatter.input('+78800555353').should.equal('+7 880 055 53 53')
// formatter.input('5').should.equal('+7 8 800 555 35 35')
// formatter.getNationalNumber().should.equal('8005553535')
})

@@ -927,6 +929,6 @@

const formatter = new AsYouType('RU')
formatter.input('88005553535')
formatter.input('89991112233')
formatter.formatter.chosenFormat.format().should.equal('$1 $2-$3-$4')
formatter.reset()
formatter.input('880055535355')
formatter.input('899911122334')
expect(formatter.formatter.chosenFormat).to.be.undefined

@@ -933,0 +935,0 @@ })

@@ -122,6 +122,6 @@ import metadata from '../metadata.min.json'

// Too long.
parseNumber('+7 (800) 55-35-35-555', { extended: true }).should.deep.equal({
parseNumber('+1 213 37342530', { extended: true }).should.deep.equal({
country : undefined,
countryCallingCode : '7',
phone : '00553535555',
countryCallingCode : '1',
phone : '21337342530',
carrierCode : undefined,

@@ -128,0 +128,0 @@ ext : undefined,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc