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

ts-dynamic-query

Package Overview
Dependencies
Maintainers
1
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-dynamic-query - npm Package Compare versions

Comparing version 1.0.35 to 1.0.36

14

dist/enums/filterOperator.d.ts

@@ -52,3 +52,15 @@ /**

*/
BETWEEN = 11
BETWEEN = 11,
/**
* field & value > 0
*/
BITWISE_ANY = 12,
/**
* field & value = 0
*/
BITWISE_ZERO = 13,
/**
* field & value = value
*/
BITWISE_ALL = 14
}

@@ -56,3 +56,15 @@ "use strict";

FilterOperator[FilterOperator["BETWEEN"] = 11] = "BETWEEN";
/**
* field & value > 0
*/
FilterOperator[FilterOperator["BITWISE_ANY"] = 12] = "BITWISE_ANY";
/**
* field & value = 0
*/
FilterOperator[FilterOperator["BITWISE_ZERO"] = 13] = "BITWISE_ZERO";
/**
* field & value = value
*/
FilterOperator[FilterOperator["BITWISE_ALL"] = 14] = "BITWISE_ALL";
})(FilterOperator = exports.FilterOperator || (exports.FilterOperator = {}));
//# sourceMappingURL=filterOperator.js.map

@@ -20,2 +20,5 @@ import { FilterDescriptor } from "../models/filterDescriptor";

static predicateNotIn<T>(obj: T, propertyPath: string, filterValue: any): boolean;
static predicateBitwiseAny<T>(obj: T, propertyPath: string, filterValue: any): boolean;
static predicateBitwiseZero<T>(obj: T, propertyPath: string, filterValue: any): boolean;
static predicateBitwiseAll<T>(obj: T, propertyPath: string, filterValue: any): boolean;
static getFilterValues(operator: FilterOperator, filterValue: any): any[];

@@ -22,0 +25,0 @@ static getRealFilters<T>(filters: FilterDescriptorBase[]): FilterDescriptorBase[];

@@ -91,4 +91,9 @@ "use strict";

var filterValues = this.getFilterValues(filterOperator_1.FilterOperator.BETWEEN, filterValue);
return (this.predicateGreaterThanOrEqual(obj, propertyPath, filterValues[0]) &&
this.predicateLessThanOrEqual(obj, propertyPath, filterValues[1]));
return (this.predicateGreaterThanOrEqual(obj, propertyPath, filterValues[0]) && this.predicateLessThanOrEqual(obj, propertyPath, filterValues[1]));
case filterOperator_1.FilterOperator.BITWISE_ANY:
return this.predicateBitwiseAny(obj, propertyPath, filterValue);
case filterOperator_1.FilterOperator.BITWISE_ZERO:
return this.predicateBitwiseZero(obj, propertyPath, filterValue);
case filterOperator_1.FilterOperator.BITWISE_ALL:
return this.predicateBitwiseAll(obj, propertyPath, filterValue);
default:

@@ -179,2 +184,14 @@ return false;

};
FilterHelper.predicateBitwiseAny = function (obj, propertyPath, filterValue) {
var propValue = obj[propertyPath];
return (propValue & filterValue) > 0;
};
FilterHelper.predicateBitwiseZero = function (obj, propertyPath, filterValue) {
var propValue = obj[propertyPath];
return (propValue & filterValue) === 0;
};
FilterHelper.predicateBitwiseAll = function (obj, propertyPath, filterValue) {
var propValue = obj[propertyPath];
return (propValue & filterValue) === filterValue;
};
FilterHelper.getFilterValues = function (operator, filterValue) {

@@ -181,0 +198,0 @@ var result = [];

2

package.json
{
"name": "ts-dynamic-query",
"version": "1.0.35",
"version": "1.0.36",
"description": "",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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