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

graphed

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphed - npm Package Compare versions

Comparing version 1.0.13 to 1.0.14

79

models/Graph.js

@@ -117,34 +117,51 @@ const _ = require('lodash');

return rx.from(args.origin ? [args.origin] : args.value)
.pipe(
rxop.mergeMap((fromNode, fromNodeIndex) => {
return rx.from(args.value)
.pipe(
rxop.map((toNode, toNodeIndex) => {
if (
!args.origin &&
(
(args.direction && fromNodeIndex === toNodeIndex) ||
(!args.direction && toNodeIndex <= fromNodeIndex)
)
) {
return null;
}
const crossLink = (value, entity) => {
const origin = !_.isArray(value);
return {
direction: args.direction,
distance: args.distance,
entity: args.entity,
fromNode,
namespace: args.namespace,
toNode
};
}),
rxop.filter(response => !_.isNull(response))
);
}),
rxop.mergeMap(response => {
return this.link(response);
})
);
return rx.from(origin ? [value] : value)
.pipe(
rxop.mergeMap((fromNode, fromNodeIndex) => {
return rx.from(args.value)
.pipe(
rxop.map((toNode, toNodeIndex) => {
if (
!origin &&
(
(args.direction && fromNodeIndex === toNodeIndex) ||
(!args.direction && toNodeIndex <= fromNodeIndex)
)
) {
return null;
}
return {
direction: args.direction,
distance: args.distance,
entity,
fromNode,
namespace: args.namespace,
toNode
};
}),
rxop.filter(response => !_.isNull(response))
);
}),
rxop.mergeMap(response => {
return this.link(response);
})
);
};
if (args.origin) {
if (args.cross) {
return rx.merge(
crossLink(args.origin, args.entity),
crossLink(args.value, `x-${args.entity}`)
);
}
return crossLink(args.origin, args.entity);
}
return crossLink(args.value, args.entity);
})

@@ -151,0 +168,0 @@ );

@@ -80,2 +80,4 @@ const joi = require('@hapi/joi');

const crossLink = joi.object({
cross: joi.boolean()
.default(true),
direction: common.direction,

@@ -82,0 +84,0 @@ distance: joi.number()

{
"name": "graphed",
"version": "1.0.13",
"version": "1.0.14",
"description": "Minimum graph's data structure implemented with pluggable stores (redis, dynamodb, memory, ...) and compatible with AWS Firehose",

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

Sorry, the diff of this file is too big to display

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