phone-country-lookup-ts

1.0.0 • Public • Published

phone-country-lookup

phone-country-lookup is a server-side tool that helps you detect the country of origin of a phone number and verify if it has the correct digit count.

Installation

To install PhoneCountryLookup, use npm:

npm install phone-country-lookup-ts

Usage

const { checkPhoneNumber } = require('./Main');

// Check a phone number
const phoneNumber = "+11234567890";
const result = checkPhoneNumber(phoneNumber);

if (result) {
  console.log(`Country: ${result.country}`);
  console.log(`Identifier: ${result.identifier}`);
  console.log(`Is Correct Number: ${result.isCorrectNumber}`);
} else {
  console.log("No match found.");
}

License

This project is licensed under the MIT License. See the LICENSE file for details.

Package Sidebar

Install

npm i phone-country-lookup-ts

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

15.4 kB

Total Files

6

Last publish

Collaborators

  • ewan_reveille--adam