Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 9 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 (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-09T02:07:29.000Z (almost 2 years ago)
- Last Synced: 2024-10-23T11:55:19.962Z (12 days 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: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Lint](https://img.shields.io/github/actions/workflow/status/dhavalveera/separate-country-code-n-number/lint.yml)](https://github.com/dhavalveera/separate-country-code-n-number/actions/workflows/lint.yml)
[![wappalyzer NPM](https://img.shields.io/badge/npm-Separate%20Country%20Code%20%26%20Number-brightgreen)](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
```