# is-phone

> Check whether a string is a valid phone number.

Latest version **2.0.0** (published 2015-01-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install is-phone
pnpm add is-phone
yarn add is-phone
bun add is-phone
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2015-01-24 |
| First published | 2014-11-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | John Otander |
| Maintainers | johno |
| Keywords | phone, regex, phone-number, is-phone-number |

## Links

- npm: https://www.npmjs.com/package/is-phone
- Repository: https://github.com/johnotander/is-phone
- Issues: https://github.com/johnotander/is-phone/issues
- npm.io page: https://npm.io/package/is-phone

## Dependencies (1)

- [phone-regex](https://npm.io/package/phone-regex.md) ^2.0.0

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2015-01-24
- 1.0.0 — 2014-12-31
- 0.0.1 — 2014-11-29

## 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: <http://jsperf.com/regexp-test-vs-match-m5>.

## 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 Request

Crafted with <3 by [John Otander](http://johnotander.com) ([@4lpine](https://twitter.com/4lpine)).

---
_Source: https://npm.io/package/is-phone · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
