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

alaska-field-text

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alaska-field-text - npm Package Compare versions

Comparing version 0.11.12 to 0.11.15

8

index.js

@@ -25,2 +25,5 @@ // @flow

createFilter(filter: Object): any|void {
if (filter instanceof RegExp) {
return filter;
}
let exact = true;

@@ -30,2 +33,5 @@ let inverse = false;

if (typeof filter === 'object') {
if (filter.$not || filter.$in || filter.$nin) {
return filter;
}
value = filter.value;

@@ -40,3 +46,3 @@ //默认精确

if (exact) {
result = new RegExp('^' + utils.escapeRegExp(value) + '$', 'i');
result = value;
} else {

@@ -43,0 +49,0 @@ result = new RegExp(utils.escapeRegExp(value), 'i');

2

package.json
{
"name": "alaska-field-text",
"version": "0.11.12",
"version": "0.11.15",
"description": "Alaska text field",

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

@@ -66,8 +66,11 @@ // @flow

this.setState({ error: false });
let filter: Alaska$filter = { value };
let filter: Alaska$filter = { value, exact: false };
if (mode !== 2) {
//不是包含:精确匹配
filter.exact = true;
}
if (inverse) {
if (!inverse) {
// $Flow
filter = value;
}
} else if (inverse) {
filter.inverse = true;

@@ -74,0 +77,0 @@ }

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