Huge News!Announcing our $40M Series B led by Abstract Ventures.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.11.0 to 0.12.0

6

index.js

@@ -13,8 +13,4 @@ /**

// Version
Object.defineProperty(loader, 'version', {
value: '0.6.1'
});
// Attaching the other classes to the loader
loader.loader = loader;
loader.helpers = helpers;

@@ -21,0 +17,0 @@ loader.Batch = Batch;

2

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

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

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

var STATEMENTS = require('./syntax.js').STATEMENTS;
var SYNTAX = require('./syntax.js'),
STATEMENTS = SYNTAX.STATEMENTS,
EMPTY_STATEMENTS = SYNTAX.EMPTY_STATEMENTS;

@@ -138,2 +140,4 @@ var INTERPOLATION_REGEX = /{([\w\d]+)}/g;

var emptyStatement = statement in EMPTY_STATEMENTS;
Query.prototype[methodName] = function(parts, params) {

@@ -166,5 +170,10 @@ var inner = null;

if (!valid || !parts.length)
if (!emptyStatement && (!valid || !parts.length))
throw Error('decypher.Query.' + methodName + ': first parameter should not be falsy or empty.');
// Filtering falsy parts in case of empty query
parts = parts.filter(function(part) {
return part;
});
// Solving objects as relationship patterns

@@ -180,3 +189,3 @@ parts = parts.map(function(part) {

if (statement)
string += statement + ' ';
string += statement + (parts.length ? ' ' : '');

@@ -183,0 +192,0 @@ if (inner) {

@@ -36,2 +36,3 @@ /**

'ELSE',
'EXPLAIN',
'FOREACH',

@@ -46,2 +47,3 @@ 'LIMIT',

'ORDER BY',
'PROFILE',
'REMOVE',

@@ -62,2 +64,15 @@ 'RETURN',

var emptyStatements = [
'EXPLAIN',
'PROFILE',
'UNION',
'UNION ALL'
];
var EMPTY_STATEMENTS = {};
emptyStatements.forEach(function(statement) {
EMPTY_STATEMENTS[statement] = true;
});
var KEYWORDS = {};

@@ -90,2 +105,3 @@

exports.STATEMENTS = STATEMENTS;
exports.EMPTY_STATEMENTS = EMPTY_STATEMENTS;
exports.KEYWORDS = KEYWORDS;
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