1.0.13 • Published 3 years ago

french-phone-api v1.0.13

Weekly downloads
1
License
MIT
Repository
github
Last release
3 years ago

FRENCH PHONE API

This small JavaScript library returns information about any French phone numbers from this website in a JSON format.

Build Status

It works with FRENCH phone numbers ONLY.

Installation

yarn add french-phone-api

or

npm i french-phone-api --save

Use

With JavaScript

var F = require('french-phone-api')
new F.FrenchPhoneInfoGetter('0782301616')
	.getInformation()
	.then((result)=>{
		console.log(result)
	})
	.catch(err=>{
		console.log(err)
	})

Or with TypeScript

import {FrenchPhoneInfoGetter} from  'french-phone-api'

try {
	const  result  =  await  new  FrenchPhoneInfoGetter('0782301615').getInformation()
	console.log(result)
} catch (error) {
	console.log(error)
}

Response

{
	input: '0778453625',
   	formatted: '+33778453625',
	isMobile: true,
	danger: 0,
	operator: 'free'
}

Test

To run tests

yarn run test

or

npm run test
1.0.13

3 years ago

1.0.11

4 years ago

1.0.12

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago