Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/byteplant/phone-validator-net
NodeJS wrapper for the phone-validator.net API
https://github.com/byteplant/phone-validator-net
byteplant cleaning cleaning-data data-quality data-validation javascript node-js node-module phone phone-marketing phone-number phone-number-verification phone-validation phonenumber typescript validation
Last synced: 3 months ago
JSON representation
NodeJS wrapper for the phone-validator.net API
- Host: GitHub
- URL: https://github.com/byteplant/phone-validator-net
- Owner: byteplant
- Created: 2016-02-18T12:51:57.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T00:39:18.000Z (about 2 years ago)
- Last Synced: 2024-04-26T14:45:51.969Z (8 months ago)
- Topics: byteplant, cleaning, cleaning-data, data-quality, data-validation, javascript, node-js, node-module, phone, phone-marketing, phone-number, phone-number-verification, phone-validation, phonenumber, typescript, validation
- Language: TypeScript
- Homepage: https://www.phone-validator.net/api.html
- Size: 347 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# phone-validator-net
A small library providing a wrapper for [api.phone-validator.net](https://www.phone-validator.net/api.html)
## Installation
```shell
npm install phone-validator-net
```## Usage
```js
import PhoneValidator from 'phone-validator-net'// YOUR_API_KEY is a string
const validatorInstance = PhoneValidator(YOUR_API_KEY)const responseObject = await validatorInstance(phoneObject) //validates phone object
//phone is an object like
// {
// number: "+49173xxxxxxxxx", //phone number to validate (string) | 0173xxxxxxx also possible with country code
// countrycode: "de", //two letter ISO 3166-1 country code (string) [optional]
// mode: "extensive" //'extensive' | 'express' (string) [optional; default 'extensive']
// }/*
responseObject looks like this:
{
status VALID_CONFIRMED, VALID_UNCONFIRMED, INVALID or error: DELAYED, RATE_LIMIT_EXCEEDED, API_KEY_INVALID_OR_DEPLETED
linetype FIXED_LINE, MOBILE, VOIP, TOLL_FREE, PREMIUM_RATE, SHARED_COST, PERSONAL_NUMBER, PAGER, UAN, VOICEMAIL
location geographical location (city, county, state)
countrycode two letter ISO 3166-1 country code
formatnational phone number in national format
formatinternational phone number in international format
}=> https://www.phone-validator.net/api.html
*/
});
```## Tests
```shell
npm test
```## Release History
- 2.0.0 Rewrite in Typescript and using Promises
- 0.1.0 Initial release