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

grex

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grex - npm Package Compare versions

Comparing version 0.5.5 to 0.5.6

2

package.json
{
"name": "grex",
"description": "Client for Rexster Graph Server",
"version": "0.5.5",
"version": "0.5.6",
"keywords": [

@@ -6,0 +6,0 @@ "database",

@@ -17,11 +17,11 @@ var http = require('http');

function Grex(options) {
var defaultOptions = {
this.defaultOptions = {
host: 'localhost',
port: 8182,
graph: 'tinkergraph',
idRegex: false, // OrientDB id regex -> /^[0-9]+:[0-9]+$/
fetched: function(response, results) { return results; }
idRegex: false // OrientDB id regex -> /^[0-9]+:[0-9]+$/
// fetched: function(response, results) { return results; }
};
this.options = _.defaults(options, defaultOptions);
this.options = _.defaults(options, this.defaultOptions);

@@ -43,5 +43,7 @@ this.resultFormatter = new ResultFormatter();

// Set options to previously setup options or switch back to the defaults
this.options = this.options || defaultOptions;
this.options = this.options || this.defaultOptions;
}
this.fetchHandler = this.options.fetched || this.defaultFetchHandler;
return Q.fcall(function() {

@@ -104,6 +106,10 @@ return this;

.then(function(response) {
return this.options.fetched(response, response.results);
return this.fetchHandler(response, response.results);
}.bind(this));
};
Grex.prototype.defaultFetchHandler = function(response, results) {
return results;
};
Grex.prototype.gremlin = function(options) {

@@ -110,0 +116,0 @@ var gremlin = new Gremlin(this, options);

@@ -24,7 +24,7 @@ var gRex = require('../index.js'),

console.error(error);
done();
});
});
});
});
describe('when passing custom options', function() {

@@ -47,2 +47,3 @@ var client;

console.error(error);
done();
});

@@ -57,3 +58,2 @@ });

describe('when instantiating Grex with custom options', function() {

@@ -73,3 +73,2 @@ var options = {

});
});
});
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