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: http://jsperf.com/regexp-test-vs-match-m5.
Installation
npm i --save is-phone
Usage
var isPhone = ; // => false // => true // => throws TypeError
License
MIT
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
Crafted with <3 by John Otander (@4lpine).