Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/enniel/indicative-phone
https://github.com/enniel/indicative-phone
Last synced: 17 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/enniel/indicative-phone
- Owner: enniel
- License: mit
- Created: 2017-09-15T10:26:41.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-09-05T14:42:25.000Z (over 6 years ago)
- Last Synced: 2024-12-06T19:54:03.014Z (about 1 month ago)
- Language: JavaScript
- Size: 12.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# indicative Phone Validator and Sanitizor
Easy phone number validation, parsing and formatting for [indicative](http://indicative.adonisjs.com/).
## Installation
```bash
$ npm i indicative-phone --save
```
or```bash
$ yarn add indicative-phone
```## Validation example
See [examples/validations.js](https://github.com/enniel/indicative-phone/tree/master/examples/validations.js)
Supported types:
- premium_rate
- toll_free
- shared_cost
- voip
- personal_number
- pager
- uan
- voicemail
- fixed_line_or_mobile
- fixed_line
- mobileFor more information about supported types see [libphonenumber-js](https://github.com/halt-hammerzeit/libphonenumber-js).
## Sanitization example
See [examples/sanitizors.js](https://github.com/enniel/indicative-phone/tree/master/examples/sanitizors.js)
## Credits
- [Evgeni Razumov](https://github.com/enniel)
## Support
Having trouble? [Open an issue](https://github.com/enniel/indicative-phone/issues/new)!
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.