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

decypher

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

decypher - npm Package Compare versions

Comparing version 0.6.1 to 0.7.0

2

package.json
{
"name": "decypher",
"version": "0.6.1",
"version": "0.7.0",
"description": "A handful of cypher utilities for Node.js",

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

@@ -203,2 +203,5 @@ [![Build Status](https://travis-ci.org/Yomguithereal/decypher.svg)](https://travis-ci.org/Yomguithereal/decypher)

>>> 'a = b OR (c = d AND e = f)'
expr.isEmpty();
>>> false
```

@@ -205,0 +208,0 @@

@@ -20,3 +20,3 @@ /**

if (firstString)
this._parts.push({operator: 'and', value: firstString});
this.and(firstString);
}

@@ -32,5 +32,11 @@

// Checking whether the expression is empty
Expression.prototype.isEmpty = function() {
return !this.compile();
};
// Compiling the expression to string
Expression.prototype.compile = function() {
var string = '',
value,
part,

@@ -43,9 +49,13 @@ i,

if (i)
if (string)
string += ' ' + part.operator.toUpperCase() + ' ';
if (part.value instanceof Expression)
string += '(' + part.value.compile() + ')';
else
if (part.value instanceof Expression) {
value = part.value.compile();
if (!!value)
string += '(' + value + ')';
}
else {
string += part.value;
}
}

@@ -52,0 +62,0 @@

@@ -120,7 +120,9 @@ /**

var valid = parts.every(function(part) {
return typeof part === 'string' || part instanceof Expression;
return !!part &&
typeof part === 'string' ||
(part instanceof Expression && !part.isEmpty());
});
if (!valid)
throw Error('decypher.Query.' + methodName + ': first parameter should be a string.');
throw Error('decypher.Query.' + methodName + ': first parameter should not be falsy or empty.');

@@ -127,0 +129,0 @@ var string = '';

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