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

@awsui/collection-hooks

Package Overview
Dependencies
Maintainers
0
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@awsui/collection-hooks - npm Package Compare versions

Comparing version 1.0.80 to 1.0.81

5

cjs/interfaces.d.ts

@@ -150,5 +150,10 @@ import * as React from 'react';

}
export interface PropertyFilterTokenGroup {
operation: PropertyFilterOperation;
tokens: readonly (PropertyFilterToken | PropertyFilterTokenGroup)[];
}
export interface PropertyFilterQuery {
tokens: readonly PropertyFilterToken[];
operation: PropertyFilterOperation;
tokenGroups?: readonly (PropertyFilterToken | PropertyFilterTokenGroup)[];
}

@@ -155,0 +160,0 @@ export interface PropertyFilterProperty<TokenValue = any> {

28

cjs/operations/property-filter.js

@@ -91,13 +91,21 @@ "use strict";

function defaultFilteringFunction(filteringPropertiesMap) {
return function (item, _a) {
var tokens = _a.tokens, operation = _a.operation;
var result = operation === 'and' ? true : !tokens.length;
for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
var token = tokens_1[_i];
result =
operation === 'and'
? result && filterByToken(token, item, filteringPropertiesMap)
: result || filterByToken(token, item, filteringPropertiesMap);
return function (item, query) {
var _a;
function evaluate(tokenOrGroup) {
if ('operation' in tokenOrGroup) {
var result = tokenOrGroup.operation === 'and' ? true : !tokenOrGroup.tokens.length;
for (var _i = 0, _a = tokenOrGroup.tokens; _i < _a.length; _i++) {
var group = _a[_i];
result = tokenOrGroup.operation === 'and' ? result && evaluate(group) : result || evaluate(group);
}
return result;
}
else {
return filterByToken(tokenOrGroup, item, filteringPropertiesMap);
}
}
return result;
return evaluate({
operation: query.operation,
tokens: (_a = query.tokenGroups) !== null && _a !== void 0 ? _a : query.tokens,
});
};

@@ -104,0 +112,0 @@ }

{
"commit": "e53768646aed39d4a83c47099b97e37401808e6e"
"commit": "0ec7db3ec48b45a54de3e89bb1cb7b335d763962"
}

@@ -150,5 +150,10 @@ import * as React from 'react';

}
export interface PropertyFilterTokenGroup {
operation: PropertyFilterOperation;
tokens: readonly (PropertyFilterToken | PropertyFilterTokenGroup)[];
}
export interface PropertyFilterQuery {
tokens: readonly PropertyFilterToken[];
operation: PropertyFilterOperation;
tokenGroups?: readonly (PropertyFilterToken | PropertyFilterTokenGroup)[];
}

@@ -155,0 +160,0 @@ export interface PropertyFilterProperty<TokenValue = any> {

@@ -88,13 +88,21 @@ import { compareDates, compareTimestamps } from '../date-utils/compare-dates.js';

function defaultFilteringFunction(filteringPropertiesMap) {
return function (item, _a) {
var tokens = _a.tokens, operation = _a.operation;
var result = operation === 'and' ? true : !tokens.length;
for (var _i = 0, tokens_1 = tokens; _i < tokens_1.length; _i++) {
var token = tokens_1[_i];
result =
operation === 'and'
? result && filterByToken(token, item, filteringPropertiesMap)
: result || filterByToken(token, item, filteringPropertiesMap);
return function (item, query) {
var _a;
function evaluate(tokenOrGroup) {
if ('operation' in tokenOrGroup) {
var result = tokenOrGroup.operation === 'and' ? true : !tokenOrGroup.tokens.length;
for (var _i = 0, _a = tokenOrGroup.tokens; _i < _a.length; _i++) {
var group = _a[_i];
result = tokenOrGroup.operation === 'and' ? result && evaluate(group) : result || evaluate(group);
}
return result;
}
else {
return filterByToken(tokenOrGroup, item, filteringPropertiesMap);
}
}
return result;
return evaluate({
operation: query.operation,
tokens: (_a = query.tokenGroups) !== null && _a !== void 0 ? _a : query.tokens,
});
};

@@ -101,0 +109,0 @@ }

{
"name": "@awsui/collection-hooks",
"version": "1.0.80",
"version": "1.0.81",
"license": "Apache-2.0",

@@ -5,0 +5,0 @@ "homepage": "https://github.com/aws/awsui-documentation",

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