phone-regex-ts
v1.0.3
Published
A phone regex builder
Downloads
1,523
Readme
phone-regex-ts
Builds a regexp to match phone-numbers.
Install
yarn add phone-regex-ts
Example (es module)
import phoneRegex from 'phone-regex-ts'
console.log(phoneRegex().test('11234567890'))
// => true
Example (commonjs)
var phoneRegex = require('phone-regex-ts');
console.log(phoneRegex().test('11234567890'))
// => true
Options:
@param indian [false] - match Indian phone numbers
@param exact [false] - perform an exact match