china-mobile-phone-regexp
v1.0.0
Published
[![NPM version][npm-image]][npm-url] [![build status][travis-image]][travis-url] [![Test coverage][codecov-image]][codecov-url] [![David deps][david-image]][david-url] [![Known Vulnerabilities][snyk-image]][snyk-url] [![npm download][download-image]][down
Downloads
10
Readme
china-mobile-phone-regexp
The regular expressions for China mobile phones.
Install
$ npm i china-mobile-phone-regexp --save
Usage
const phone = require('china-mobile-phone-regexp');
// Is phone number?
console.log(phone.is('13800138000'));
// Is CHINA_MOBILE phone number?
console.log(phone.is('13800138000', phone.CHINA_MOBILE));
// Is CHINA_UNICOM phone number?
console.log(phone.is('13800138000', phone.CHINA_UNICOM));
// Is CHINA_TELECOM phone number?
console.log(phone.is('13800138000', phone.CHINA_TELECOM));
Questions & Suggestions
Please open an issue here.