https://github.com/dhavalveera/separate-country-code-n-number
NPM Package to separate the Country Code & Number
https://github.com/dhavalveera/separate-country-code-n-number
analyze country detect identify library npm npm-cli npmjs number phone phone-number
Last synced: 15 days ago
JSON representation
NPM Package to separate the Country Code & Number
- Host: GitHub
- URL: https://github.com/dhavalveera/separate-country-code-n-number
- Owner: dhavalveera
- License: mit
- Created: 2023-01-05T05:12:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-09T02:07:29.000Z (over 3 years ago)
- Last Synced: 2025-03-08T19:35:42.650Z (about 1 year ago)
- Topics: analyze, country, detect, identify, library, npm, npm-cli, npmjs, number, phone, phone-number
- Language: JavaScript
- Homepage:
- Size: 50.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/dhavalveera/separate-country-code-n-number/actions/workflows/lint.yml)
[](https://www.npmjs.com/package/@dhavalveera/separate-country-code-n-number)
# Separate Country Code & Number
**[Separate Country Code & Number](https://www.npmjs.com/package/@dhavalveera/separate-country-code-n-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
- [Git](https://git-scm.com)
- [Node.js](https://nodejs.org) version 14 or higher
- [Yarn](https://yarnpkg.com)
## Quick start
```sh
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
```sh
node src/drivers/npm/cli.js "+911234567890"
```
**`output:`**
```sh
Country ISD Code => +91
Country Name => India
Phone Number is => 1234567890
```