Skip to content

node-modules/china-mobile-phone-regexp

Repository files navigation

china-mobile-phone-regexp

NPM version build status Test coverage David deps Known Vulnerabilities npm download

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.

License

MIT

About

The regular expressions for China mobile phone number.

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •