0.1.1 • Published 10 years ago

phono v0.1.1

Weekly downloads
1
License
-
Repository
github
Last release
10 years ago

phono

spm version NPM version Build Status NPM downloads David David

SPM and NPM module, phone number validator.

安装

$ spm install phono --save
$ npm install phono --save

使用

var phono = require('phono');

// Valid
phono('13800138000').isValid();

// China Mobile
phono('17050000000').isCM();
phono('17050000000').isChinaMobile();

// China Telecom
phono('17000000000').isCT();
phono('17000000000').isChinaTelecom();

// China Unicom
phono('17090000000').isCU();
phono('17090000000').isChinaUnicom();

// China Virtual
phono('17050000000').isCV();
phono('17050000000').isChinaVirtual();
phono('17000000000').isCV();
phono('17000000000').isChinaVirtual();
phono('17090000000').isCV();
phono('17090000000').isChinaVirtual();