graph-data-structure
Advanced tools
Comparing version 1.14.0 to 1.15.0
@@ -141,11 +141,3 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.GraphDataStructure = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ | ||
function hasEdge(u, v) { | ||
var has = false; | ||
if (edges[u]) { | ||
adjacent(u).forEach(function (_v) { | ||
if (_v === v) { | ||
has = true; | ||
} | ||
}); | ||
} | ||
return has; | ||
return adjacent(u).includes(v); | ||
} | ||
@@ -152,0 +144,0 @@ // Computes the indegree for the given node. |
10
index.js
@@ -140,11 +140,3 @@ "use strict"; | ||
function hasEdge(u, v) { | ||
var has = false; | ||
if (edges[u]) { | ||
adjacent(u).forEach(function (_v) { | ||
if (_v === v) { | ||
has = true; | ||
} | ||
}); | ||
} | ||
return has; | ||
return adjacent(u).includes(v); | ||
} | ||
@@ -151,0 +143,0 @@ // Computes the indegree for the given node. |
{ | ||
"name": "graph-data-structure", | ||
"version": "1.14.0", | ||
"version": "1.15.0", | ||
"description": "A graph data structure with topological sort.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,6 +5,2 @@ # graph-data-structure | ||
[![NPM](https://nodei.co/npm/graph-data-structure.png)](https://npmjs.org/package/graph-data-structure) | ||
[![NPM](https://nodei.co/npm-dl/graph-data-structure.png?months=3)](https://npmjs.org/package/graph-data-structure) | ||
[![Build Status](https://travis-ci.org/datavis-tech/graph-data-structure.svg?branch=master)](https://travis-ci.org/datavis-tech/graph-data-structure) | ||
This library provides a minimalist implementation of a directed graph data structure. Nodes are represented by unique strings. Internally, an [adjacency list](https://en.wikipedia.org/wiki/Adjacency_list) is used to represent nodes and edges. | ||
@@ -11,0 +7,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44017
835
245