1.0.13 • Published 4 years ago

french-phone-api v1.0.13

Weekly downloads
1
License
MIT
Repository
github
Last release
4 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

4 years ago

1.0.11

5 years ago

1.0.12

5 years ago

1.0.10

6 years ago

1.0.9

6 years ago

1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago