0.1.6 • Published 5 years ago

@apilayer/numverify v0.1.6

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

numverify-go

Numverify offers global phone number validation & lookup JSON API

Installation

Using npm

npm require --save @apilayer/numverify

or yarn

yarn add @apilayer/numverify

validate

validate validates mobile number

Signature:

validate(number: string, country_code: string = ''): Promise<Response>

Example:

const response = layer.check("14158586273")

console.log("response: ", response)

Specifying a country code above will perform a local number search

Response:

{
  valid: true,
  number: "14158586273",
  local_format: "4158586273",
  international_format: "+14158586273",
  country_prefix: "+1",
  country_code: "US",
  country_name: "United States of America",
  location: "Novato",
  carrier: "AT&T Mobility LLC",
  line_type: "mobile"
}

countries

countries returns a list of all supported countries

Signature:

countries(): Promise<Record<string, Record<string, string>>>

Example:

const response = layer.countries()

console.log("response: ", response)

Response:

{
  "AF": {
    "country_name": "Afghanistan",
    "dialling_code": "+93"
  },
  ...
}

License

MIT