New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

phone

Package Overview
Dependencies
Maintainers
0
Versions
125
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

phone - npm Package Compare versions

Comparing version 3.1.46 to 3.1.47

16

dist/data/country_phone_data.js

@@ -92,4 +92,12 @@ "use strict";

},
// {alpha2: "AN", alpha3: "ANT", country_code: "599", country_name: "Netherlands Antilles", mobile_begin_with: [], phone_number_lengths: []},
// https://en.wikipedia.org/wiki/Telephone_numbers_in_Cura%C3%A7ao_and_the_Caribbean_Netherlands
{
alpha2: "BQ",
alpha3: "BES",
country_code: "599",
country_name: "Caribbean Netherlands",
mobile_begin_with: ['3', '416', '700', '701', '795'],
phone_number_lengths: [7]
},
{
alpha2: 'AE',

@@ -420,6 +428,6 @@ alpha3: 'ARE',

alpha3: 'CUW',
country_code: '5999',
country_code: '599',
country_name: 'Curaçao',
mobile_begin_with: ['5', '6'],
phone_number_lengths: [7]
mobile_begin_with: ['95', '96'],
phone_number_lengths: [8]
},

@@ -426,0 +434,0 @@ {

{
"name": "phone",
"version": "3.1.46",
"version": "3.1.47",
"description": "With a given country and phone number, validate and format the phone number to E.164 standard",

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

@@ -291,7 +291,7 @@ # Phone · [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](http://makeapullrequest.com) [![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2FAfterShip%2Fphone.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2FAfterShip%2Fphone?ref=badge_shield)

It reserves the flexibility to extend the response interface for invalid result in future.
It reserves the flexibility to extend the response interface for invalid results in the future.
## Migrate from v2
The interface of v3 has been changed for better usability, maintainability and flexibility, this shows all the changes from v2:
The interface of v3 has been changed for better usability, maintainability, and flexibility, this shows all the changes from v2:

@@ -315,14 +315,14 @@ #### Function Interface

`allowLandline` in v2 is essentially equals to `validateMobilePrefix` in v3, however, the value is opposite.
`allowLandline` in v2 is essentially equal to `validateMobilePrefix` in v3, however, the value is the opposite.
Because `allowLandline = true` in v2 means "Skip the mobile phone number prefix validation", and there is NO capability to verify if the input phone number is a valid landline phone number.
To avoid the misleading information, the parameter name has been changed to `validateMobilePrefix`, and the input value is opposite, while `validateMobilePrefix = false` means "Skip the mobile phone number prefix validation".
To avoid misleading information, the parameter name has been changed to `validateMobilePrefix`, and the input value is the opposite, while `validateMobilePrefix = false` means "Skip the mobile phone number prefix validation".
## Help
## Phone Number Format Improvement
We've tried to make sure that this package works for as many cases as possible, if you notice that we have an incorrect rule for a country or other case, please open an issue to let us know.
We strive to ensure this package functions well across diverse scenarios. However, please note that the phone number formats may not be updated proactively or regularly, as this is a manual task and we lack a dedicated incentive for continuous updates. If you find any incorrect rules for a country or other specific case, please create a pull request to inform us.
For creating new pull requests regarding add or modify phone number formats, please include the reference information such as PDFs, websites, etc. Thank you very much.
When submitting pull requests to add or modify phone number formats, it is essential to include reference information such as PDFs, websites, etc. **PRs submitted without references will not be accepted.** Thank you for your understanding and cooperation.

@@ -329,0 +329,0 @@ **The library supports mobile phone number format only.** We are unable to provide landline phone number support as we do not have landline phone number format data, hence we do not accept PRs for landline phone numbers.

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