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

bridge-odata

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bridge-odata - npm Package Compare versions

Comparing version 0.0.8 to 0.0.9

6

package.json
{
"name": "bridge-odata",
"version": "0.0.8",
"description": "Retsly OData JS SDK",
"version": "0.0.9",
"description": "Bridge API OData JS SDK",
"main": "src/index.js",

@@ -19,3 +19,3 @@ "scripts": {

"author": "Joe joetho@zillowgroup.com",
"license": "MIT",
"license": "GPLv3",
"dependencies": {

@@ -22,0 +22,0 @@ "acorn": "^5.7.1",

@@ -116,8 +116,18 @@ /* jshint esversion: 6 */

if (!COMPARATOR_MAP.hasOwnProperty(operation)) {
throw new Error(`'${operation}', is not a valid operation`)
}
if (typeof operation === 'function') {
acorn.parse(operation);
let names = acorn.parse(operation).body[0].expression.params.map(param => param.name);
// The parameters must be left or right
if ((!names.includes('left') || !names.includes('right')) || names.length > 2) {
throw new Error(`custom operation must only include parameters left and right ${names} is an invalid set.`)
}
// Either parameters are (left,right) or (right,left)
if (names[0] === 'left') {
this.str = operation(left, right)
} else {
this.str = operation(right, left)
}
} else {
if (!COMPARATOR_MAP.hasOwnProperty(operation)) {
throw new Error(`'${operation}', is not a valid operation`)
}
// Create the actual query string.

@@ -124,0 +134,0 @@ this.str = COMPARATOR_MAP[operation](left, right)

@@ -1,2 +0,2 @@

let filter = require('../src/lib/filter')
const filter = require('../src/lib/filter')
const assert = require('assert')

@@ -3,0 +3,0 @@

@@ -1,3 +0,3 @@

let sdk = require('../src/index')
let filter = require('../src/lib/filter')
const sdk = require('../src/index')
const filter = require('../src/lib/filter')
const assert = require('assert')

@@ -4,0 +4,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