Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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
```