# @menty44/phonecodelib

> returns country's based of supplied parameters

Latest version **9.0.0** (published 2021-02-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install @menty44/phonecodelib
pnpm add @menty44/phonecodelib
yarn add @menty44/phonecodelib
bun add @menty44/phonecodelib
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 9.0.0 |
| Published | 2021-02-18 |
| First published | 2021-02-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 58.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | menty44 |
| Keywords | phone, code, phonecode, country, countryphone |

## Links

- npm: https://www.npmjs.com/package/@menty44/phonecodelib
- npm.io page: https://npm.io/package/@menty44/phonecodelib

## Alternatives

- [flatbuffers](https://npm.io/package/flatbuffers.md) — 6.0M weekly downloads
- [@exodus/patch-broken-hermes-typed-arrays](https://npm.io/package/@exodus/patch-broken-hermes-typed-arrays.md) — 28.5K weekly downloads
- [@native-to-anchor/buffer-layout](https://npm.io/package/@native-to-anchor/buffer-layout.md) — 12.2K weekly downloads
- [binary-parser-encoder](https://npm.io/package/binary-parser-encoder.md) — 5.3K weekly downloads
- [datasets-fi-postalcodes](https://npm.io/package/datasets-fi-postalcodes.md) — 1.1K weekly downloads

## Recent versions

- 9.0.0 (latest) — 2021-02-18
- 8.0.0 — 2021-02-18
- 7.0.0 — 2021-02-18
- 6.0.0 — 2021-02-18
- 5.0.0 — 2021-02-18
- 4.0.0 — 2021-02-18
- 3.0.0 — 2021-02-18
- 2.0.0 — 2021-02-17
- 1.0.0 — 2021-02-17

## README

# phonecodelib

[![GitHub issues](https://img.shields.io/github/issues/menty44/phonecodelib)](https://github.com/menty44/phonecodelib/issues)
[![Ask Me Anything !](https://img.shields.io/badge/Ask%20me-anything-1abc9c.svg)](https://github.com/menty44)
[![Documentation Status](https://readthedocs.org/projects/ansicolortags/badge/?version=latest)](http://ansicolortags.readthedocs.io/?badge=latest)
[![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/menty44/phonecodelib/blob/main/LICENSE)
[![GitHub release](https://img.shields.io/github/release/Naereen/StrapDown.js.svg)](https://github.com/menty44/phonecodelib/releases/)
[![GitHub stars](https://img.shields.io/github/stars/menty44/phonecodelib)](https://github.com/menty44/phonecodelib/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/menty44/phonecodelib)](https://github.com/menty44/phonecodelib/network)[![forthebadge](https://forthebadge.com/images/badges/made-with-javascript.svg)](https://forthebadge.com)

A javascript library for returning a country's info based on supplied parameters

## Table of Contents
- [Installing](#installing)
- [Example](#example)

## Installing

Using npm:

```bash
$ npm i @menty44/phonecodelib
```

## Example

### note: CommonJS usage
In order to gain the TypeScript typings (for intellisense / autocomplete) while using CommonJS imports with `require()` use the following approach:

```js
const countryInfo = require('@menty44/phonecodelib');
```

### Example 1 
#### Get By Phone Number

```js
const countryInfo = require('@menty44/phonecodelib');

let info = countryInfo.getByPhoneNumber("2547XXXXXX");

console.log(info);
```

### Example 2
#### Get By Country Code ISO

```js
const countryInfo = require('@menty44/phonecodelib');

let info = countryInfo.getByCountryCode("Ke");

console.log(info);
```

### Example 3
#### Get By Country Name

```js
const countryInfo = require('@menty44/phonecodelib');

let info = countryInfo.getByCountryName("Kenya");

console.log(info);
```

---
_Source: https://npm.io/package/@menty44/phonecodelib · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
