9.0.0 • Published 3 years ago

@menty44/phonecodelib v9.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 years ago

phonecodelib

GitHub issues Ask Me Anything ! Documentation Status GitHub license GitHub release GitHub stars GitHub forksforthebadge

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

Table of Contents

Installing

Using npm:

$ 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:

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

Example 1

Get By Phone Number

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

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

console.log(info);

Example 2

Get By Country Code ISO

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

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

console.log(info);

Example 3

Get By Country Name

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

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

console.log(info);
4.0.0

3 years ago

5.0.0

3 years ago

7.0.0

3 years ago

8.0.0

3 years ago

9.0.0

3 years ago

6.0.0

3 years ago

3.0.0

3 years ago

2.0.0

3 years ago

1.0.0

3 years ago