
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
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.
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.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.