1.1.1 • Published 7 years ago
mobile-phone-number-utils v1.1.1
Chinese Mobile Phone Number Utils
Usage
const utils = require('mobile-phone-number-utils');
utils.verifyMobiPhoNum('23456789912'); // => false
utils.verifyMobiPhoNum('13888888888'); // => true
utils.cleanMobiPhoNum('138 8888 8888'); // => '13888888888'
utils.maskMobiPhoNum('13888888888') // => '138****8888'
utils.maskMobiPhoNum('13888888888', {
from: 3,
to: 6,
symbol: '?'
}); // => '138????8888'
utils.formatMobile('13888888888', '###-####-####') // => '138-8888-8888'
Author
Chung Guo
License
Copyright © 2018 Chung Guo Released under the MIT license.