New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@api-modeling/graphlib

Package Overview
Dependencies
Maintainers
6
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@api-modeling/graphlib - npm Package Compare versions

Comparing version
3.0.3
to
3.0.4
+1
-1
package.json
{
"name": "@api-modeling/graphlib",
"version": "3.0.3",
"version": "3.0.4",
"description": "A directed and undirected multi-graph library",

@@ -5,0 +5,0 @@ "author": "Chris Pettitt <cpettitt@gmail.com>",

@@ -78,3 +78,3 @@ import { CountedEdges, Edge, GraphInit, NodeChildren, NodeIdentifier, NodeParents } from "./types";

*
* @returns {boolean} `true` if the graph is directed.
* @returns `true` if the graph is directed.
*/

@@ -84,3 +84,3 @@ isDirected(): boolean;

/**
* @returns {boolean} `true` if the graph is a [multigraph](https://github.com/dagrejs/graphlib/wiki/API-Reference#multigraphs).
* @returns `true` if the graph is a [multigraph](https://github.com/dagrejs/graphlib/wiki/API-Reference#multigraphs).
*/

@@ -90,3 +90,3 @@ isMultigraph(): boolean;

/**
* @returns {boolean} `true` if the graph is [compound](https://github.com/dagrejs/graphlib/wiki/API-Reference#compound-graphs).
* @returns `true` if the graph is [compound](https://github.com/dagrejs/graphlib/wiki/API-Reference#compound-graphs).
*/

@@ -98,3 +98,3 @@ isCompound(): boolean;

*/
setGraph(label: any): Graph<G,N,E>;
setGraph(label: G): this;

@@ -104,3 +104,3 @@ /**

*/
graph(): any|undefined;
graph(): G|undefined;

@@ -110,3 +110,3 @@ /**

*/
_defaultNodeLabelFn(node?: NodeIdentifier): any|undefined;
_defaultNodeLabelFn(node?: NodeIdentifier): N|undefined;

@@ -116,3 +116,3 @@ /**

*/
_defaultEdgeLabelFn(v: NodeIdentifier, w: NodeIdentifier, name?: string): any|undefined;
_defaultEdgeLabelFn(v: NodeIdentifier, w: NodeIdentifier, name?: string): E|undefined;

@@ -124,3 +124,3 @@ /**

*/
setDefaultNodeLabel(newDefault: string|((node?: NodeIdentifier) => any)): Graph<G,N,E>;
setDefaultNodeLabel(newDefault: string|((node?: NodeIdentifier) => N)): this;

@@ -149,3 +149,3 @@ /**

*/
setNodes(vs: NodeIdentifier[], value?: N): Graph<G,N,E>;
setNodes(vs: NodeIdentifier[], value?: N): this;

@@ -161,3 +161,3 @@ /**

*/
setNode(v: NodeIdentifier, label?: N): Graph<G,N,E>;
setNode(v: NodeIdentifier, label?: N): this;

@@ -180,3 +180,3 @@ /**

*/
removeNode(v: NodeIdentifier): Graph<G,N,E>;
removeNode(v: NodeIdentifier): this;

@@ -190,3 +190,3 @@ /**

*/
setParent(v: NodeIdentifier, parent?: NodeIdentifier): Graph<G,N,E>;
setParent(v: NodeIdentifier, parent?: NodeIdentifier): this;

@@ -228,2 +228,3 @@ _removeFromParentsChildList(v: NodeIdentifier): void;

* @param filter The filter function.
* @returns A copy of the graph with filtered nodes.
*/

@@ -237,3 +238,3 @@ filterNodes(filter: (id: NodeIdentifier) => boolean): Graph<G,N,E>;

*/
setDefaultEdgeLabel(newDefault: string|((v:NodeIdentifier, w:NodeIdentifier, name?: string|number) => any)): Graph<G,N,E>;
setDefaultEdgeLabel(newDefault: string|((v:NodeIdentifier, w:NodeIdentifier, name?: string|number) => E)): this;

@@ -250,3 +251,3 @@ /**

setPath(vs: NodeIdentifier[], value?: string): Graph<G,N,E>;
setPath(vs: NodeIdentifier[], value?: string): this;

@@ -269,3 +270,18 @@ /**

*/
setEdge(v: NodeIdentifier|Edge<E>, w?: NodeIdentifier|E, value?: E, name?: string|number): Graph<G,N,E>;
setEdge(v: NodeIdentifier, w: NodeIdentifier, value?: E, name?: string|number): this;
/**
* Creates or updates the label for the edge (v, w) with the optionally supplied name.
* If `label` is supplied it is set as the value for the edge. If `label` is not supplied and the edge
* is created by this call then the default edge label will be assigned.
* The name parameter is only useful with multi graphs.
* setEdge(v, w, [value, [name]])
* setEdge({ v, w, [name] }, [value])
*
* Takes O(1) time.
*
* @param edge
* @param value
* @returns Returns the graph, allowing this to be chained with other functions.
*/
setEdge(edge: Edge<E>, value?: E): this;

@@ -277,4 +293,4 @@ /**

*
* @param v
* @param w Required when `v` is not an edge. When the `v` is an object then this is `name` param.
* @param v The id of the source node
* @param w The id of the target node
* @param name

@@ -284,3 +300,14 @@ * @returns the label for the edge (v, w) if the graph has an edge between `v` and `w` with the optional name.

*/
edge(v: Edge<E>|NodeIdentifier, w?: NodeIdentifier|string, name?: string|number): E|undefined;
edge(v: NodeIdentifier, w: NodeIdentifier, name?: string|number): E|undefined;
/**
* The name parameter is only useful with multi graphs. `v` and `w` can be interchanged for undirected graphs.
*
* Takes O(1) time.
*
* @param edge
* @param name
* @returns the label for the edge (v, w) if the graph has an edge between `v` and `w` with the optional name.
* Returns `undefined` if there is no such edge in the graph.
*/
edge(edge: Edge<E>, name?: string|number): E|undefined;

@@ -293,8 +320,19 @@ /**

*
* @param v
* @param w Required when `v` is not an edge. When the `v` is an object then this is `name` param.
* @param v The id of the source node
* @param w The id of the target node
* @param name
* @returns `true` if the graph has an edge between `v` and `w` with the optional name.
*/
hasEdge(v: Edge<E>|NodeIdentifier, w?: NodeIdentifier|string, name?: string): boolean;
hasEdge(v: NodeIdentifier, w: NodeIdentifier, name?: string): boolean;
/**
* The name parameter is only useful with [multi graphs](https://github.com/dagrejs/graphlib/wiki/API-Reference#multigraphs).
* `v` and `w` can be interchanged for undirected graphs.
*
* Takes O(1) time.
*
* @param edge The edge to test
* @param name
* @returns `true` if the graph has an edge between `v` and `w` with the optional name.
*/
hasEdge(edge: Edge<E>, name?: string): boolean;

@@ -308,7 +346,18 @@ /**

*
* @param v
* @param w Required when `v` is not an edge. When the `v` is an object then this is `name` param.
* @param edge The edge to remove.
* @param name
*/
removeEdge(v: Edge<E>|NodeIdentifier, w?: NodeIdentifier|string, name?: string): Graph<G,N,E>;
removeEdge(edge: Edge<E>, name?: string): this;
/**
* Removes the edge (v, w) if the graph has an edge between `v` and `w` with the optional name.
* If not this function does nothing. The `name` parameter is only useful with multi graphs.
* `v` and `w` can be interchanged for undirected graphs.
*
* Takes O(1) time.
*
* @param v The id of the source node
* @param w The id of the target node
* @param name
*/
removeEdge(v: NodeIdentifier, w: NodeIdentifier, name?: string): this;

@@ -315,0 +364,0 @@ /**