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

simple-odata-server

Package Overview
Dependencies
Maintainers
2
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-odata-server - npm Package Compare versions

Comparing version 1.0.1 to 1.1.0

0

index.js

@@ -0,0 +0,0 @@ /*!

@@ -0,0 +0,0 @@ /*!

@@ -0,0 +0,0 @@ /*!

@@ -0,0 +0,0 @@ /* eslint no-redeclare:0 */

25

lib/queryTransform.js

@@ -47,2 +47,21 @@ /*!

Node.prototype._prop = function (result, left, rightValue) {
if (left.type === 'property' && left.name.indexOf('/') !== -1) {
var fragments = left.name.split('/')
var obj = result[fragments[0]] || {}
for (var i = 1; i < fragments.length; i++) {
if (i === (fragments.length - 1)) {
obj[fragments[i]] = rightValue
} else {
obj[fragments[i]] = obj[fragments[i]] || {}
}
}
result[fragments[0]] = obj
} else {
result[left.name] = rightValue
}
}
Node.prototype.transform = function () {

@@ -52,11 +71,11 @@ var result = {}

if (this.type === 'eq' && this.right.type === 'literal') {
result[this.left.name] = this.right.value
this._prop(result, this.left, this.right.value)
}
if (this.type === 'lt' && this.right.type === 'literal') {
result[this.left.name] = { '$lt': this.right.value }
this._prop(result, this.left, { '$lt': this.right.value })
}
if (this.type === 'gt' && this.right.type === 'literal') {
result[this.left.name] = { '$gt': this.right.value }
this._prop(result, this.left, { '$gt': this.right.value })
}

@@ -63,0 +82,0 @@

2

package.json
{
"name": "simple-odata-server",
"version": "1.0.1",
"version": "1.1.0",
"description": "OData server with adapter for mongodb and nedb",

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

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