2.0.0 • Published 11 years ago
is-phone v2.0.0
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-phoneUsage
var isPhone = require('is-phone');
isPhone('invalid-phone-number') // => false
isPhone('123 456 7890') // => true
isPhone({}) // => throws TypeErrorLicense
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).