Skip to content

dhavalveera/separate-country-code-n-number

Repository files navigation

Lint wappalyzer NPM

Separate Country Code & Number

Separate Country Code & Number is used to separate the country ISD Code & Phone Number from the string, and returns Country Code, Phone Number & Country separately.

If you don't have time to write the code to separate the country code & number from a single string, we offer the solution where you can get the Country ISD Code, Country Name & Phone Number separately with this tiny package.

Prerequisites

Quick start

git clone https://github.com/dhavalveera/separate-country-code-n-number.git
cd separate-country-code-n-number
yarn install
yarn run link

Usage

Command line

node src/drivers/npm/cli.js "+911234567890"

output:

Country ISD Code =>  +91
Country Name =>  India
Phone Number is =>  1234567890