Comparing version 1.0.2 to 1.0.3
@@ -40,3 +40,3 @@ var iso3166_data = [ | ||
{alpha2: "AE", alpha3: "ARE", country_code: "971", country_name: "United Arab Emirates", mobile_begin_with: ["5"], phone_number_lengths: [9]}, | ||
{alpha2: "AR", alpha3: "ARG", country_code: "54", country_name: "Argentina", mobile_begin_with: [], phone_number_lengths: [10]}, | ||
{alpha2: "AR", alpha3: "ARG", country_code: "54", country_name: "Argentina", mobile_begin_with: ["9"], phone_number_lengths: [10]}, | ||
{alpha2: "AM", alpha3: "ARM", country_code: "374", country_name: "Armenia", mobile_begin_with: ["5", "7", "9"], phone_number_lengths: [8]}, | ||
@@ -86,3 +86,3 @@ {alpha2: "AS", alpha3: "ASM", country_code: "1", country_name: "American Samoa", mobile_begin_with: ["733", "258"], phone_number_lengths: [7]}, | ||
{alpha2: "CL", alpha3: "CHL", country_code: "56", country_name: "Chile", mobile_begin_with: ["9"], phone_number_lengths: [9]}, | ||
{alpha2: "CN", alpha3: "CHN", country_code: "86", country_name: "China", mobile_begin_with: ["13", "14", "15", "18"], phone_number_lengths: [11]}, | ||
{alpha2: "CN", alpha3: "CHN", country_code: "86", country_name: "China", mobile_begin_with: ["13", "14", "15", "17", "18"], phone_number_lengths: [11]}, | ||
{alpha2: "CI", alpha3: "CIV", country_code: "225", country_name: "Côte D'Ivoire", mobile_begin_with: ["0", "4", "5", "6"], phone_number_lengths: [8]}, | ||
@@ -105,3 +105,3 @@ {alpha2: "CM", alpha3: "CMR", country_code: "237", country_name: "Cameroon", mobile_begin_with: ["7", "9"], phone_number_lengths: [8]}, | ||
{alpha2: "DM", alpha3: "DMA", country_code: "1", country_name: "Dominica", mobile_begin_with: [], phone_number_lengths: [7]}, | ||
{alpha2: "DK", alpha3: "DNK", country_code: "45", country_name: "Denmark", mobile_begin_with: [], phone_number_lengths: [8]}, | ||
{alpha2: "DK", alpha3: "DNK", country_code: "45", country_name: "Denmark", mobile_begin_with: ["5"], phone_number_lengths: [8]}, | ||
{alpha2: "DO", alpha3: "DOM", country_code: "1", country_name: "Dominican Republic", mobile_begin_with: ["809", "829", "849"], phone_number_lengths: [10]}, | ||
@@ -108,0 +108,0 @@ {alpha2: "DZ", alpha3: "DZA", country_code: "213", country_name: "Algeria", mobile_begin_with: ["5", "6", "7"], phone_number_lengths: [9]}, |
{ | ||
"name": "phone", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "With a given country and phone number, validate and format the phone number to E.164 standard", | ||
@@ -5,0 +5,0 @@ "main": "./lib/index", |
@@ -79,2 +79,3 @@ ## What is node-phone? | ||
var phone = require('phone'); | ||
phone('+852 6569-8900'); // return ['+85265698900', 'HKG'] | ||
phone('(817) 569-8900'); // return ['+18175698900, 'USA'] | ||
@@ -81,0 +82,0 @@ phone('(817) 569-8900', ''); // return ['+18175698900, 'USA'] |
@@ -54,2 +54,20 @@ var should = require('should'), | ||
describe('Test 3', function() { | ||
var number = '+852 6569-8900', | ||
result = ['+85265698900', 'HKG']; | ||
it('returns ' + result, function() { | ||
phone(number).should.eql(result); | ||
}); | ||
}); | ||
describe('Test 4', function() { | ||
var number = '+852 6569-8900', | ||
country = 'HKG', | ||
result = ['+85265698900', 'HKG']; | ||
it('returns ' + result, function() { | ||
phone(number, country).should.eql(result); | ||
}); | ||
}); | ||
}); | ||
@@ -56,0 +74,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
59111
830
138
0