Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ts-tool-unify

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-tool-unify - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

src/utils/validatePhone.js

2

package.json
{
"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
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc