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

odata-query

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

odata-query - npm Package Compare versions

Comparing version 2.0.0 to 3.0.0

15

dist/index.js

@@ -74,2 +74,3 @@ 'use strict';

var COLLECTION_OPERATORS = ['any', 'all'];
var BOOLEAN_FUNCTIONS = ['startswith', 'endswith', 'contains'];

@@ -122,12 +123,14 @@ function buildFilter() {

} else if (op === 'in') {
// Convert `{ Prop: [1,2,3] }` to `Prop eq 1 or Prop eq 2 or Prop eq 3`
// Convert `{ Prop: { in: [1,2,3] } }` to `Prop eq 1 or Prop eq 2 or Prop eq 3`
result.push(value[op].map(function (v) {
return propName + ' eq ' + handleValue(v);
}).join(' or '));
} else if (op.indexOf('()') === op.length - 2) {
// Single boolean function (startswith(), endswith(), contains())
result.push(op.slice(0, op.length - 2) + '(' + propName + ', ' + handleValue(value[op]) + ')');
} else {
// Nested property
result.push(propName + '/' + buildFilter(value));
if (BOOLEAN_FUNCTIONS.indexOf(op) !== -1) {
// Simple boolean functions (startswith, endswith, contains)
result.push(op + '(' + propName + ', ' + handleValue(value[op]) + ')');
} else {
// Nested property
result.push(propName + '/' + buildFilter(value));
}
}

@@ -134,0 +137,0 @@ });

2

package.json
{
"name": "odata-query",
"version": "2.0.0",
"version": "3.0.0",
"author": "Sean Lynch <techniq35@gmail.com>",

@@ -5,0 +5,0 @@ "license": "MIT",

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