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

febs

Package Overview
Dependencies
Maintainers
3
Versions
206
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

febs - npm Package Compare versions

Comparing version 0.8.77 to 0.8.78

browser/dist/febs-0.8.78/febs.base.js

38

browser/common/string.js

@@ -16,3 +16,3 @@ 'use strict';

if (!str) return false;
if (/^0?1[2|3|4|5|6|7|8][0-9]\d{8}$/.test(str)) {
if (/^(1[2-9][0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89]|98[0-9]|99[0-9])\d{8}$/.test(str)) {
return true;

@@ -24,2 +24,38 @@ }

/**
* @desc: 判断是否是email.
* @return: boolean.
*/
exports.isEmail = function (str) {
if (!str) return false;
if (/^(([A-Za-z0-9\u4e00-\u9fa5_-]|\.)+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+)$/.test(str)) {
return true;
}
return false;
};
/**
* @desc: 判断是否是英文数字组合.
* @return: boolean.
*/
exports.isAlphaOrDigit = function (str) {
if (!str) return false;
if (/^[A-Za-z0-9]+$/.test(str)) {
return true;
}
return false;
};
/**
* @desc: 判断是否是中文.
* @return: boolean.
*/
exports.isChinese = function (str) {
if (!str) return false;
if (/^[\u4e00-\u9fa5]{0,}$/.test(str)) {
return true;
}
return false;
};
/**
* @desc: 是否为空串.

@@ -26,0 +62,0 @@ * @return: boolean.

2

browser/package.json

@@ -80,3 +80,3 @@ {

"name": "febs-browser",
"version": "0.8.77"
"version": "0.8.78"
}

@@ -641,3 +641,3 @@

*/
function denodeify(fn: any, self: any, argumentCount?: number): Promise<any>;
function denodeify(fn: any, self?: any, argumentCount?: number): ()=>Promise<any>;

@@ -708,3 +708,22 @@ /**

function isPhoneMobile(str: string): boolean;
/**
* @desc: 判断是否是email.
* @return: boolean.
*/
function isEmail(str: string): boolean;
/**
* @desc: 判断是否是英文数字组合.
* @return: boolean.
*/
function isAlphaOrDigit(str: string): boolean;
/**
* @desc: 判断是否是中文.
* @return: boolean.
*/
function isChinese(str: string): boolean;
/**
* @desc: 是否为空串.

@@ -711,0 +730,0 @@ * @return: boolean.

@@ -90,3 +90,3 @@ {

"name": "febs",
"version": "0.8.77"
"version": "0.8.78"
}

@@ -653,3 +653,3 @@ // Type definitions for febs

*/
function denodeify(fn: any, self: any, argumentCount?: number): Promise<any>;
function denodeify(fn: any, self?: any, argumentCount?: number): ()=>Promise<any>;

@@ -728,3 +728,22 @@ /**

function isPhoneMobile(str: string): boolean;
/**
* @desc: 判断是否是email.
* @return: boolean.
*/
function isEmail(str: string): boolean;
/**
* @desc: 判断是否是英文数字组合.
* @return: boolean.
*/
function isAlphaOrDigit(str: string): boolean;
/**
* @desc: 判断是否是中文.
* @return: boolean.
*/
function isChinese(str: string): boolean;
/**
* @desc: 是否为空串.

@@ -731,0 +750,0 @@ * @return: boolean.

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