Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johno/is-phone
Check whether a string is a valid phone number.
https://github.com/johno/is-phone
Last synced: 2 months ago
JSON representation
Check whether a string is a valid phone number.
- Host: GitHub
- URL: https://github.com/johno/is-phone
- Owner: johno
- License: mit
- Created: 2014-11-29T17:13:15.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-01-27T07:27:24.000Z (almost 10 years ago)
- Last Synced: 2024-10-19T17:31:13.657Z (3 months ago)
- Language: JavaScript
- Size: 152 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Is Phone
[![Build Status](https://travis-ci.org/johnotander/is-phone.svg?branch=master)](https://travis-ci.org/johnotander/is-phone)
Check whether a string is a valid phone number. This uses `test` rather than `match` to ensure
it's as fast as possible: .## Installation
```
npm i --save is-phone
```## Usage
```javascript
var isPhone = require('is-phone');isPhone('invalid-phone-number') // => false
isPhone('123 456 7890') // => true
isPhone({}) // => throws TypeError
```## License
MIT
## Contributing
1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull RequestCrafted with <3 by [John Otander](http://johnotander.com) ([@4lpine](https://twitter.com/4lpine)).