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

gremlin-v3

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gremlin-v3 - npm Package Compare versions

Comparing version 0.0.19 to 0.0.20

49

lib/graph-wrapper.js

@@ -36,2 +36,24 @@ 'use strict';

// Create a GraphSONMapper (promise) that preserves types.
GraphWrapper.prototype._newGraphSONMapper = function () {
var callStaticMethod = Q.nbind(this.java.callStaticMethod, this.java);
return callStaticMethod('com.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper', 'build')
.then(function (builder) {
var embedTypes = Q.nbind(builder.embedTypes, builder);
return embedTypes(true);
})
.then(function (builder) {
var create = Q.nbind(builder.create, builder);
return create();
});
};
// Create a GraphSONMapper that preserves types.
GraphWrapper.prototype._newGraphSONMapperSync = function () {
var builder = this.java.callStaticMethodSync('com.tinkerpop.gremlin.structure.io.graphson.GraphSONMapper', 'build');
builder.embedTypesSync(true);
var mapper = builder.createSync();
return mapper;
};
// Loads the graph as GraphSON, and returns promise to the graph (for fluent API).

@@ -45,2 +67,9 @@ GraphWrapper.prototype.loadGraphSON = function (filename, callback) {

.then(function (builder) {
return self._newGraphSONMapper()
.then(function (mapper) {
var mapperQ = Q.nbind(builder.mapper, builder);
return mapperQ(mapper);
});
})
.then(function (builder) {
var create = Q.nbind(builder.create, builder);

@@ -62,2 +91,4 @@ return create();

var builder = this.java.callStaticMethodSync('com.tinkerpop.gremlin.structure.io.graphson.GraphSONReader', 'build');
var mapper = this._newGraphSONMapperSync();
builder.mapperSync(mapper);
var reader = builder.createSync();

@@ -76,2 +107,9 @@ reader.readGraphSync(stream, this.graph);

.then(function (builder) {
return self._newGraphSONMapper()
.then(function (mapper) {
var mapperQ = Q.nbind(builder.mapper, builder);
return mapperQ(mapper);
});
})
.then(function (builder) {
var create = Q.nbind(builder.create, builder);

@@ -93,2 +131,4 @@ return create();

var builder = this.java.callStaticMethodSync('com.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter', 'build');
var mapper = this._newGraphSONMapperSync();
builder.mapperSync(mapper);
var writer = builder.createSync();

@@ -106,2 +146,9 @@ writer.writeGraphSync(stream, this.graph);

.then(function (builder) {
return self._newGraphSONMapper()
.then(function (mapper) {
var mapperQ = Q.nbind(builder.mapper, builder);
return mapperQ(mapper);
});
})
.then(function (builder) {
var create = Q.nbind(builder.create, builder);

@@ -133,2 +180,4 @@ return create();

var builder = this.java.callStaticMethodSync('com.tinkerpop.gremlin.structure.io.graphson.GraphSONWriter', 'build');
var mapper = this._newGraphSONMapperSync();
builder.mapperSync(mapper);
var writer = builder.createSync();

@@ -135,0 +184,0 @@ writer.writeGraphSync(stream, this.graph);

2

package.json
{
"name": "gremlin-v3",
"description": "Gremlin for graph databases which implement the TinkerPop3 property graph data model.",
"version": "0.0.19",
"version": "0.0.20",
"keywords": [

@@ -6,0 +6,0 @@ "gremlin",

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