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 0.2.13 to 0.2.14

15

build/as you type.js

@@ -583,2 +583,8 @@ 'use strict';

if (number_pattern) {
// A phone number format matches,
// so this is the country.
if (!this.country) {
this.country = this.default_country;
}
this.create_formatting_template(format, number_pattern);

@@ -596,3 +602,4 @@ this.chosen_format = format;

// No format matches the phone number,
// therefore set `country` to `undefined`.
// therefore set `country` to `undefined`
// (or to the default country).
} catch (err) {

@@ -613,3 +620,7 @@ _didIteratorError2 = true;

this.country = this.default_country;
if (this.default_country && this.parsed_input && this.parsed_input[0] !== '+') {
this.country = this.default_country;
} else {
this.country = undefined;
}

@@ -616,0 +627,0 @@ // No format matches the national phone number entered

2

package.json
{
"name": "libphonenumber-js",
"version": "0.2.13",
"version": "0.2.14",
"description": "A simpler (and smaller) rewrite of Google Android's popular libphonenumber library",

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

@@ -616,2 +616,9 @@ // This is an enhanced port of Google Android `libphonenumber`'s

{
// A phone number format matches,
// so this is the country.
if (!this.country)
{
this.country = this.default_country
}
this.create_formatting_template(format, number_pattern)

@@ -629,4 +636,12 @@ this.chosen_format = format

// No format matches the phone number,
// therefore set `country` to `undefined`.
this.country = this.default_country
// therefore set `country` to `undefined`
// (or to the default country).
if (this.default_country && this.parsed_input && this.parsed_input[0] !== '+')
{
this.country = this.default_country
}
else
{
this.country = undefined
}

@@ -633,0 +648,0 @@ // No format matches the national phone number entered

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

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