🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

flame-utils

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

flame-utils - npm Package Compare versions

Comparing version
1.0.3
to
1.0.4
+12
src/untils/checkPhoneNum.js
let checkPhoneNum = function(phone_num, check_types = ['phone', 'landline']) {
let check_list = {
phone: /^((13[0-9])|(14[5-9])|(15([0-3]|[5-9]))|(16[6-7])|(17[1-8])|(18[0-9])|(19[1-3])|(19[5|6])|(19[8|9]))\d{8}$/, // 手机
landline: /^\d{3}-\d{7,8}|\d{4}-\d{7,8}$/, // 座机
}
for (let type of check_types) {
if (check_list[type].test(phone_num)) {
return true
}
}
return false
}
+1
-1
{
"name": "flame-utils",
"version": "1.0.3",
"version": "1.0.4",
"description": "flame前端工具类",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -1,2 +0,2 @@

import checkPhoneNum from 'untils/demo.js'
import checkPhoneNum from 'untils/checkPhoneNum.js'
let flame = {

@@ -3,0 +3,0 @@ untils: {

let checkPhoneNum = function(phone_num, check_types = ['phone', 'landline']) {
let check_list = {
phone: /^((13[0-9])|(14[5-9])|(15([0-3]|[5-9]))|(16[6-7])|(17[1-8])|(18[0-9])|(19[1-3])|(19[5|6])|(19[8|9]))\d{8}$/, // 手机
landline: /^\d{3}-\d{7,8}|\d{4}-\d{7,8}$/, // 座机
}
for (let type of check_types) {
if (check_list[type].test(phone_num)) {
return true
}
}
return false
}