
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
graphology-assertions
Advanced tools
Assertions to be used with graphology
.
npm install graphology-assertions
Function returning whether the given value is a graphology
implementation's instance.
import {isGraph} from 'graphology-assertions';
const graph = new Graph();
isGraph(graph);
>>> true
isGraph(45);
>>> false
isGraph({hello: 'world'});
>>> false
Arguments
Function returning whether the given value is a graphology
constructor.
import {isGraphConstructor} from 'graphology-assertions';
isGraphConstructor(Graph);
>>> true
isGraphConstructor(45);
>>> false
isGraphConstructor(new Graph());
>>> false
Arguments
Returns whether two graphs have the same nodes.
import {haveSameNodes} from 'graphology-assertions';
haveSameNodes(G, H);
Returns whether two graphs have the same nodes & whether those nodes have the same attributes.
import {haveSameNodesDeep} from 'graphology-assertions';
haveSameNodesDeep(G, H);
Returns whether two graphs are the same.
import {areSameGraphs} from 'graphology-assertions';
areSameGraphs(G, H);
Returns whether two graphs as well as their node & edge attributes are the same.
import {areSameGraphsDeep} from 'graphology-assertions';
areSameGraphsDeep(G, H);
Returns whether two graphs have the same edges. Note that it implies that both graphs' nodes are also the same.
This is different than areSameGraphs because it will allow different graph types to be compared, e.g. a mixed graph and a directed one having the same edges nonetheless.
import {haveSameEdges} from 'graphology-assertions';
haveSameEdges(G, H);
Returns whether two graphs have the same edges & whether those edges have the same attributes. Note that it implies that both graphs' nodes are also the same.
This is different than areSameGraphsDeep because it will allow different graph types to be compared, e.g. a mixed graph and a directed one having the same edges nonetheless.
import {haveSameEdgesDeep} from 'graphology-assertions';
haveSameEdgesDeep(G, H);
FAQs
Assertions for graphology.
The npm package graphology-assertions receives a total of 1,243 weekly downloads. As such, graphology-assertions popularity was classified as popular.
We found that graphology-assertions demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.