Socket
Socket
Sign inDemoInstall

@types/graphlib

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/graphlib - npm Package Compare versions

Comparing version 2.1.8 to 2.1.9

125

graphlib/index.d.ts

@@ -6,8 +6,7 @@ // Type definitions for graphlib 2.1.1

declare module "graphlib" {
export interface GraphOptions {
directed?: boolean | undefined; // default: true.
multigraph?: boolean | undefined; // default: false.
compound?: boolean | undefined; // default: false.
directed?: boolean | undefined; // default: true.
multigraph?: boolean | undefined; // default: false.
compound?: boolean | undefined; // default: false.
}

@@ -29,3 +28,3 @@

* Complexity: O(1).
*
*
* @argument label - default node label.

@@ -38,6 +37,6 @@ * @returns the graph, allowing this to be chained with other functions.

* Sets the default node label factory function. This function will be invoked
* each time when setting a node with no label specified and returned value
* each time when setting a node with no label specified and returned value
* will be used as a label for node.
* Complexity: O(1).
*
*
* @argument labelFn - default node label factory function.

@@ -53,3 +52,3 @@ * @returns the graph, allowing this to be chained with other functions.

* Complexity: O(1).
*
*
* @argument name - node name.

@@ -64,3 +63,3 @@ * @argument label - value to set for node.

* Complexity: O(|names|).
*
*
* @argument names - list of nodes names to be set.

@@ -77,3 +76,3 @@ * @argument label - value to set for each node in list.

* Average-case complexity: O(1).
*
*
* @argument v - node to be child for p.

@@ -88,3 +87,3 @@ * @argument p - node to be parent for v.

* Complexity: O(1).
*
*
* @argument v - node to get parent of.

@@ -98,3 +97,3 @@ * @returns parent node name or void if v has no parent.

* Complexity: O(1).
*
*
* @argument v - node to get children of.

@@ -110,3 +109,3 @@ * @returns children nodes names list.

* Average-case complexity: O(|E|+|V|).
*
*
* @argument filter - filtration function detecting whether the node should stay or not.

@@ -121,3 +120,3 @@ * @returns new graph made from current and nodes filtered.

* Complexity: O(1).
*
*
* @argument label - default edge label.

@@ -130,6 +129,6 @@ * @returns the graph, allowing this to be chained with other functions.

* Sets the default edge label factory function. This function will be invoked
* each time when setting an edge with no label specified and returned value
* each time when setting an edge with no label specified and returned value
* will be used as a label for edge.
* Complexity: O(1).
*
*
* @argument labelFn - default edge label factory function.

@@ -145,3 +144,3 @@ * @returns the graph, allowing this to be chained with other functions.

* Complexity: O(|nodes|).
*
*
* @argument nodes - list of nodes to be connected in series.

@@ -155,4 +154,4 @@ * @argument label - value to set for each edge between pairs of nodes.

* Detects whether graph has a node with specified name or not.
*
*
* @argument name - name of the node.

@@ -178,3 +177,3 @@ * @returns true if graph has node with specified name, false - otherwise.

* Complexity: O(1).
*
*
* @returns list of graph nodes.

@@ -187,3 +186,3 @@ */

* Complexity: O(|V|).
*
*
* @returns label value of the node.

@@ -199,3 +198,3 @@ */

* Complexity: O(1).
*
*
* @argument v - edge source node.

@@ -210,8 +209,8 @@ * @argument w - edge sink node.

/**
* Creates or updates the label for the specified edge. If label is supplied it is
* set as the value for the edge. If label is not supplied and the edge was created
* by this call then the default edge label will be assigned. The name parameter is
* Creates or updates the label for the specified edge. If label is supplied it is
* set as the value for the edge. If label is not supplied and the edge was created
* by this call then the default edge label will be assigned. The name parameter is
* only useful with multigraphs.
* Complexity: O(1).
*
*
* @argument edge - edge descriptor.

@@ -226,3 +225,3 @@ * @argument label - value to associate with the edge.

* Complexity: O(|E|).
*
*
* @return graph edges list.

@@ -235,3 +234,3 @@ */

* Complexity: O(1).
*
*
* @argument v - edge source node.

@@ -241,3 +240,3 @@ * @argument w - edge sink node.

* @returns value associated with specified edge.
*/
*/
edge(v: string, w: string, name?: string): any;

@@ -248,6 +247,6 @@

* Complexity: O(1).
*
*
* @argument edge - edge descriptor.
* @returns value associated with specified edge.
*/
*/
edge(e: Edge): any;

@@ -258,3 +257,3 @@

* Complexity: O(1).
*
*
* @argument v - edge source node.

@@ -270,3 +269,3 @@ * @argument w - edge sink node.

* Complexity: O(1).
*
*
* @argument edge - edge descriptor.

@@ -280,3 +279,3 @@ * @returns whether the graph contains the specified edge or not.

* Complexity: O(1).
*
*
* @argument edge - edge descriptor.

@@ -290,3 +289,3 @@ * @returns the graph, allowing this to be chained with other functions.

* Complexity: O(1).
*
*
* @argument v - edge source node.

@@ -303,3 +302,3 @@ * @argument w - edge sink node.

* Complexity: O(|E|).
*
*
* @argument v - edge sink node.

@@ -315,3 +314,3 @@ * @argument w - edge source node.

* Complexity: O(|E|).
*
*
* @argument v - edge source node.

@@ -327,3 +326,3 @@ * @argument w - edge sink node.

* Complexity: O(|E|).
*
*
* @argument v - edge adjacent node.

@@ -339,3 +338,3 @@ * @argument w - edge adjacent node.

* Complexity: O(|V|).
*
*
* @argument v - node identifier.

@@ -350,3 +349,3 @@ * @returns node identifiers list or undefined if v is not in the graph.

* Complexity: O(|V|).
*
*
* @argument v - node identifier.

@@ -361,3 +360,3 @@ * @returns node identifiers list or undefined if v is not in the graph.

* Complexity: O(|V|).
*
*
* @argument v - node identifier.

@@ -371,3 +370,3 @@ * @returns node identifiers list or undefined if v is not in the graph.

* Whether graph was created with 'directed' flag set to true or not.
*
*
* @returns whether the graph edges have an orientation.

@@ -379,3 +378,3 @@ */

* Whether graph was created with 'multigraph' flag set to true or not.
*
*
* @returns whether the pair of nodes of the graph can have multiple edges.

@@ -387,3 +386,3 @@ */

* Whether graph was created with 'compound' flag set to true or not.
*
*
* @returns whether a node of the graph can have subnodes.

@@ -395,3 +394,3 @@ */

* Sets the label of the graph.
*
*
* @argument label - label value.

@@ -404,3 +403,3 @@ * @returns the graph, allowing this to be chained with other functions.

* Gets the graph label.
*
*
* @returns currently assigned label for the graph or undefined if no label assigned.

@@ -413,3 +412,3 @@ */

* Complexity: O(1).
*
*
* @returns nodes count.

@@ -422,3 +421,3 @@ */

* Complexity: O(1).
*
*
* @returns edges count.

@@ -431,3 +430,3 @@ */

* Complexity: O(|V|).
*
*
* @returns the graph source nodes.

@@ -440,3 +439,3 @@ */

* Complexity: O(|V|).
*
*
* @returns the graph source nodes.

@@ -451,3 +450,3 @@ */

* JSON.stringify. The graph can later be restored using json.read.
*
*
* @argument graph - target to create JSON representation of.

@@ -467,3 +466,3 @@ * @returns JSON serializable graph representation

* // [ { v: 'a', w: 'b' } ]
*
*
* @argument json - JSON serializable graph representation

@@ -485,3 +484,3 @@ * @returns graph constructed acccording to specified representation

* Complexity: O(|V|).
*
*
* @argument graph - graph to find components in.

@@ -514,3 +513,3 @@ * @returns array of nodes list representing components

weightFn?: (e: Edge) => number,
edgeFn?: (v: string) => Edge[]
edgeFn?: (v: string) => Edge[],
): { [node: string]: Path };

@@ -535,3 +534,3 @@

weightFn?: (e: Edge) => number,
edgeFn?: (v: string) => Edge[]
edgeFn?: (v: string) => Edge[],
): { [source: string]: { [node: string]: Path } };

@@ -546,3 +545,3 @@

* Complexity: O(|V| + |E|).
*
*
* @argument graph - graph where to search cycles.

@@ -557,3 +556,3 @@ * @returns cycles list.

* to get the actual list of cycles in the graph.
*
*
* @argument graph - graph to detect whether it acyclic ot not.

@@ -586,3 +585,3 @@ * @returns whether graph contain cycles or not.

weightFn?: (e: Edge) => number,
edgeFn?: (v: string) => Edge[]
edgeFn?: (v: string) => Edge[],
): { [source: string]: { [node: string]: Path } };

@@ -622,3 +621,3 @@

* Complexity: O(|V| + |E|).
*
*
* @argument graph - graph to apply topological sorting to.

@@ -633,3 +632,3 @@ * @returns an array of nodes such that for each edge u -> v, u appears before v in the array.

* is directed then this algorithm will navigate using successors.
*
*
* @argument graph - depth first traversal target.

@@ -639,3 +638,3 @@ * @argument vs - nodes list to traverse.

*/
function preorder(graph: Graph, vs: string[]): string[]
function preorder(graph: Graph, vs: string[]): string[];

@@ -646,3 +645,3 @@ /**

* is directed then this algorithm will navigate using successors.
*
*
* @argument graph - depth first traversal target.

@@ -652,4 +651,4 @@ * @argument vs - nodes list to traverse.

*/
function postorder(graph: Graph, vs: string[]): string[]
function postorder(graph: Graph, vs: string[]): string[];
}
}
{
"name": "@types/graphlib",
"version": "2.1.8",
"version": "2.1.9",
"description": "TypeScript definitions for graphlib",

@@ -26,4 +26,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/graphlib",

"dependencies": {},
"typesPublisherContentHash": "832551611e83b8fdf034bfd7d3a4b31bdddd8216517da07d1afde8b4a9df7078",
"typeScriptVersion": "3.6"
"typesPublisherContentHash": "cdb6eaf3f67fa0860e2eadeae27acd4cdca3abaa2eab7f5710db5d4930f636a5",
"typeScriptVersion": "4.5"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Tue, 06 Jul 2021 20:33:08 GMT
* Last updated: Wed, 20 Sep 2023 17:08:03 GMT
* Dependencies: none

@@ -14,0 +14,0 @@ * Global values: none

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