New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

qcfv

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qcfv - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

22

index.js
/*****************************************************************
表单校验工具类 (qc)
*****************************************************************/
/**
* 判断字符串是否为空
*
* @param num
* @return
* @author qc
*/
exports.isEmptyStr = function(str){
if (str !== "" && str != null && str!="undefined" ) {
return true;
}else{
return false;
}
}
/**
* 判断整数num是否等于0

@@ -217,3 +231,3 @@ *

   re = new RegExp(/^(\d{6})()?(\d{4})(\d{2})(\d{2})(\d{3})(\w)$/);
   else {alert("输入的数字位数不对。"); return false;}
   else { return false;}
   var a = num.match(re);

@@ -232,5 +246,5 @@ if (a != null)

   }
   if (!B) {alert("输入的身份证号 "+ a[0] +" 里出生日期不对。"); return false;}
   if (!B) { return false;}
   }
   if(!re.test(num)){alert("身份证最后一位只能是数字和字母。");return false;}
   if(!re.test(num)){return false;}
  

@@ -237,0 +251,0 @@ return true;

2

package.json
{
"name": "qcfv",
"version": "1.0.2",
"version": "1.0.3",
"description": "form validator",

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

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