2.1.3 • Published 3 months ago

@toluwap/phone-number-formatter v2.1.3

Weekly downloads
-
License
ISC
Repository
github
Last release
3 months ago

🧐 About

Format any valid Nigeria number into an international format.

Installing

$ npm install @toluwap/phone-number-formatter --save

Usage

const { convertNigeriaPhoneNumberToInternationFormat } = require('@toluwap/phone-number-formatter');
import { convertNigeriaPhoneNumberToInternationFormat } from '@toluwap/phone-number-formatter';
//using array of phoneNumbers
const phoneNumbers = ['08012345678', '2348102345678', '07012345678', '+23481098765432'];

const phoneNumbers1 = convertNigeriaPhoneNumberToInternationFormat({phoneNumbers: phoneNumbers});
// ['2348012345678', '2348102345678', '2347012345678', '23481098765432']

//adding prepend to the numbers
const phoneNumbers1 = convertNigeriaPhoneNumberToInternationFormat({phoneNumbers: phoneNumbers, options: { prepend: '+'}});
//['+2348012345678', '+2348102345678', '+2347012345678', '+23481098765432']
2.1.2

3 months ago

2.1.1

3 months ago

2.1.3

3 months ago

2.1.0

2 years ago

2.0.0

2 years ago

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago