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.4.19 to 0.4.20

24

build/as you type.js

@@ -378,10 +378,5 @@ 'use strict';

// "leading digits" patterns start with a maximum 3 digits,
// "leading digits" patterns start with a maximum of 3 digits,
// and then with each additional digit
// a more precise "leading digits" pattern is specified.
// They could make "leading digits" patterns start
// with a maximum of a single digit, but they didn't,
// so it's possible that some phone number formats
// will be falsely rejected until there are at least
// 3 digits in the national (significant) number being input.

@@ -421,12 +416,15 @@ var index_of_leading_digits_pattern = leading_digits.length - MIN_LEADING_DIGITS_LENGTH;

// "leading digits" patterns start with a maximum 3 digits,
// "leading digits" patterns start with a maximum of 3 digits,
// and then with each additional digit
// a more precise "leading digits" pattern is specified.
// They could make "leading digits" patterns start
// with a maximum of a single digit, but they didn't,
// so it's possible that some phone number formats
// will be falsely rejected until there are at least
// 3 digits in the national (significant) number being input.
if (leading_digits.length <= MIN_LEADING_DIGITS_LENGTH) {
// Start matching any formats at all when the national number
// entered so far is at least 3 digits long,
// otherwise format matching would give false negatives
// like when the digits entered so far are `2`
// and the leading digits pattern is `21` –
// it's quite obvious in this case that the format could be the one
// but due to the absence of further digits it would give false negative.
//
if (leading_digits.length < MIN_LEADING_DIGITS_LENGTH) {
return this.available_formats;

@@ -433,0 +431,0 @@ }

@@ -356,10 +356,5 @@ import _getIterator from 'babel-runtime/core-js/get-iterator';

// "leading digits" patterns start with a maximum 3 digits,
// "leading digits" patterns start with a maximum of 3 digits,
// and then with each additional digit
// a more precise "leading digits" pattern is specified.
// They could make "leading digits" patterns start
// with a maximum of a single digit, but they didn't,
// so it's possible that some phone number formats
// will be falsely rejected until there are at least
// 3 digits in the national (significant) number being input.

@@ -399,12 +394,15 @@ var index_of_leading_digits_pattern = leading_digits.length - MIN_LEADING_DIGITS_LENGTH;

// "leading digits" patterns start with a maximum 3 digits,
// "leading digits" patterns start with a maximum of 3 digits,
// and then with each additional digit
// a more precise "leading digits" pattern is specified.
// They could make "leading digits" patterns start
// with a maximum of a single digit, but they didn't,
// so it's possible that some phone number formats
// will be falsely rejected until there are at least
// 3 digits in the national (significant) number being input.
if (leading_digits.length <= MIN_LEADING_DIGITS_LENGTH) {
// Start matching any formats at all when the national number
// entered so far is at least 3 digits long,
// otherwise format matching would give false negatives
// like when the digits entered so far are `2`
// and the leading digits pattern is `21` –
// it's quite obvious in this case that the format could be the one
// but due to the absence of further digits it would give false negative.
//
if (leading_digits.length < MIN_LEADING_DIGITS_LENGTH) {
return this.available_formats;

@@ -411,0 +409,0 @@ }

{
"name": "libphonenumber-js",
"version": "0.4.19",
"version": "0.4.20",
"description": "A simpler (and smaller) rewrite of Google Android's popular libphonenumber library",

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

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

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