Socket
Socket
Sign inDemoInstall

async-validator

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

async-validator - npm Package Compare versions

Comparing version 1.8.2 to 1.8.4

8

es/rule/range.js

@@ -18,2 +18,4 @@ import * as util from '../util';

var max = typeof rule.max === 'number';
// 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
var val = value;

@@ -37,5 +39,9 @@ var key = null;

}
if (str || arr) {
if (arr) {
val = value.length;
}
if (str) {
// 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".lenght !== 3
val = value.replace(spRegexp, '_').length;
}
if (len) {

@@ -42,0 +48,0 @@ if (val !== rule.len) {

@@ -28,2 +28,4 @@ 'use strict';

var max = typeof rule.max === 'number';
// 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)
var spRegexp = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
var val = value;

@@ -47,5 +49,9 @@ var key = null;

}
if (str || arr) {
if (arr) {
val = value.length;
}
if (str) {
// 处理码点大于U+010000的文字length属性不准确的bug,如"𠮷𠮷𠮷".lenght !== 3
val = value.replace(spRegexp, '_').length;
}
if (len) {

@@ -52,0 +58,0 @@ if (val !== rule.len) {

2

package.json
{
"name": "async-validator",
"version": "1.8.2",
"version": "1.8.4",
"description": "validate form asynchronous",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc