ts-tool-unify
Advanced tools
Comparing version 1.0.1 to 1.0.2
{ | ||
"name": "ts-tool-unify", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/ts-tool-unfiy.js", |
@@ -0,17 +1,7 @@ | ||
import { validatePhone } from 'validatePhone.js' | ||
class TsToolC { | ||
constructor() {} | ||
/* | ||
*@author: wangjun | ||
*@date: 2019-07-04 16:42:07 | ||
*@description: 校验手机号 | ||
*/ | ||
validatePhone(phoneNum) { | ||
const re = /^1\d{10}/g | ||
if (typeof phoneNum === 'undefined') { | ||
throw Error('请传入手机号') | ||
} | ||
return re.test(phoneNum) | ||
} | ||
validatePhone | ||
} | ||
const TsTool = new TsToolC() | ||
module.exports = TsTool |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2152
7
28