Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aureooms-js-adjacency-list

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aureooms-js-adjacency-list - npm Package Compare versions

Comparing version 1.0.0 to 2.0.0

test/js/src/spec.js

2

bower.json

@@ -15,3 +15,3 @@ {

],
"version": "1.0.0",
"version": "2.0.0",
"main": "js/dist/adjacency-list.js",

@@ -18,0 +18,0 @@ "homepage": "http://aureooms.github.io/js-adjacency-list/",

@@ -7,3 +7,3 @@ {

"description": "adjacency list code bricks for JavaScript",
"version": "1.0.0",
"version": "2.0.0",
"main": "js/dist/adjacency-list.js",

@@ -10,0 +10,0 @@ "name": "aureooms-js-adjacency-list",

@@ -49,3 +49,3 @@ "use strict";

try {
for (var _iterator = this.eitr(v)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
for (var _iterator = this.iitr(v)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
var e = _step.value;

@@ -114,3 +114,3 @@ this.edel(e);

Graph.prototype.eitr = regeneratorRuntime.mark(function callee$3$0(v) {
Graph.prototype.iitr = regeneratorRuntime.mark(function callee$3$0(v) {
return regeneratorRuntime.wrap(function callee$3$0$(context$4$0) {

@@ -198,3 +198,3 @@ while (1) switch (context$4$0.prev = context$4$0.next) {

Graph.prototype.aeitr = regeneratorRuntime.mark(function callee$3$0() {
Graph.prototype.eitr = regeneratorRuntime.mark(function callee$3$0() {
return regeneratorRuntime.wrap(function callee$3$0$(context$4$0) {

@@ -212,2 +212,143 @@ while (1) switch (context$4$0.prev = context$4$0.next) {

Graph.prototype.edges = regeneratorRuntime.mark(function callee$3$0() {
var _iteratorNormalCompletion3, _didIteratorError3, _iteratorError3, _iterator3, _step3, e;
return regeneratorRuntime.wrap(function callee$3$0$(context$4$0) {
while (1) switch (context$4$0.prev = context$4$0.next) {
case 0:
_iteratorNormalCompletion3 = true;
_didIteratorError3 = false;
_iteratorError3 = undefined;
context$4$0.prev = 3;
_iterator3 = this.eitr()[Symbol.iterator]();
case 5:
if (_iteratorNormalCompletion3 = (_step3 = _iterator3.next()).done) {
context$4$0.next = 12;
break;
}
e = _step3.value;
context$4$0.next = 9;
return [e.u, e.v, e];
case 9:
_iteratorNormalCompletion3 = true;
context$4$0.next = 5;
break;
case 12:
context$4$0.next = 18;
break;
case 14:
context$4$0.prev = 14;
context$4$0.t0 = context$4$0["catch"](3);
_didIteratorError3 = true;
_iteratorError3 = context$4$0.t0;
case 18:
context$4$0.prev = 18;
context$4$0.prev = 19;
if (!_iteratorNormalCompletion3 && _iterator3["return"]) {
_iterator3["return"]();
}
case 21:
context$4$0.prev = 21;
if (!_didIteratorError3) {
context$4$0.next = 24;
break;
}
throw _iteratorError3;
case 24:
return context$4$0.finish(21);
case 25:
return context$4$0.finish(18);
case 26:
case "end":
return context$4$0.stop();
}
}, callee$3$0, this, [[3, 14, 18, 26], [19,, 21, 25]]);
});
Graph.prototype.incident = regeneratorRuntime.mark(function callee$3$0(v) {
var _iteratorNormalCompletion4, _didIteratorError4, _iteratorError4, _iterator4, _step4, e;
return regeneratorRuntime.wrap(function callee$3$0$(context$4$0) {
while (1) switch (context$4$0.prev = context$4$0.next) {
case 0:
_iteratorNormalCompletion4 = true;
_didIteratorError4 = false;
_iteratorError4 = undefined;
context$4$0.prev = 3;
_iterator4 = this.iitr(v)[Symbol.iterator]();
case 5:
if (_iteratorNormalCompletion4 = (_step4 = _iterator4.next()).done) {
context$4$0.next = 12;
break;
}
e = _step4.value;
context$4$0.next = 9;
return [e.u, e.v, e];
case 9:
_iteratorNormalCompletion4 = true;
context$4$0.next = 5;
break;
case 12:
context$4$0.next = 18;
break;
case 14:
context$4$0.prev = 14;
context$4$0.t0 = context$4$0["catch"](3);
_didIteratorError4 = true;
_iteratorError4 = context$4$0.t0;
case 18:
context$4$0.prev = 18;
context$4$0.prev = 19;
if (!_iteratorNormalCompletion4 && _iterator4["return"]) {
_iterator4["return"]();
}
case 21:
context$4$0.prev = 21;
if (!_didIteratorError4) {
context$4$0.next = 24;
break;
}
throw _iteratorError4;
case 24:
return context$4$0.finish(21);
case 25:
return context$4$0.finish(18);
case 26:
case "end":
return context$4$0.stop();
}
}, callee$3$0, this, [[3, 14, 18, 26], [19,, 21, 25]]);
});
Graph.prototype.endpoints = function (e) {
return [e.u, e.v];
};
return Graph;

@@ -214,0 +355,0 @@ };

@@ -1,2 +0,2 @@

"use strict";!function(){var e=function(e,t){var r=function(e,t){this.u=e,this.v=t,this.iterator=null,this.uiterator=null,this.viterator=null};e.Edge=r;var n=function(e){var n=function(){this.V=new e,this.E=new e};return n.prototype.vadd=function(){var t=new o(new e);return t.iterator=this.V.push(t),t},n.prototype.vdel=function(e){var r=!0,n=!1,o=t;try{for(var i,a=this.eitr(e)[Symbol.iterator]();!(r=(i=a.next()).done);r=!0){var u=i.value;this.edel(u)}}catch(s){n=!0,o=s}finally{try{!r&&a["return"]&&a["return"]()}finally{if(n)throw o}}this.E.erase(e.iterator)},n.prototype.eadd=function(e,t){var n=new r(e,t);return n.iterator=this.E.push(n),n.uiterator=e.E.push(n),e!==t&&(n.viterator=t.E.push(n)),n},n.prototype.edel=function(e){this.E.erase(e.iterator),e.u.E.erase(e.uiterator),e.u!==e.v&&e.v.E.erase(e.viterator)},n.prototype.vitr=regeneratorRuntime.mark(function i(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.V,"t0",1);case 1:case"end":return e.stop()}},i,this)}),n.prototype.eitr=regeneratorRuntime.mark(function a(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(e.E,"t0",1);case 1:case"end":return t.stop()}},a,this)}),n.prototype.nitr=regeneratorRuntime.mark(function u(e){var r,n,o,i,a,s,c,p;return regeneratorRuntime.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:r=!0,n=!1,o=t,u.prev=3,i=e.E[Symbol.iterator]();case 5:if(r=(a=i.next()).done){u.next=14;break}return s=a.value,c=s.u,p=s.v,u.next=11,c===e?p:c;case 11:r=!0,u.next=5;break;case 14:u.next=20;break;case 16:u.prev=16,u.t0=u["catch"](3),n=!0,o=u.t0;case 20:u.prev=20,u.prev=21,!r&&i["return"]&&i["return"]();case 23:if(u.prev=23,!n){u.next=26;break}throw o;case 26:return u.finish(23);case 27:return u.finish(20);case 28:case"end":return u.stop()}},u,this,[[3,16,20,28],[21,,23,27]])}),n.prototype.aeitr=regeneratorRuntime.mark(function s(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.E,"t0",1);case 1:case"end":return e.stop()}},s,this)}),n};e.List=n;var o=function(e){this.iterator=null,this.E=e};return e.Vertex=o,e};"object"==typeof exports?e(exports):"function"==typeof define&&define.amd?define("aureooms-js-adjacency-list",[],function(){return e({})}):"object"==typeof window&&"object"==typeof window.document?e(window.adjacencylist={}):console.error("unable to detect type of module to define for aureooms-js-adjacency-list")}();
"use strict";!function(){var e=function(e,t){var r=function(e,t){this.u=e,this.v=t,this.iterator=null,this.uiterator=null,this.viterator=null};e.Edge=r;var n=function(e){var n=function(){this.V=new e,this.E=new e};return n.prototype.vadd=function(){var t=new a(new e);return t.iterator=this.V.push(t),t},n.prototype.vdel=function(e){var r=!0,n=!1,a=t;try{for(var i,o=this.iitr(e)[Symbol.iterator]();!(r=(i=o.next()).done);r=!0){var s=i.value;this.edel(s)}}catch(u){n=!0,a=u}finally{try{!r&&o["return"]&&o["return"]()}finally{if(n)throw a}}this.E.erase(e.iterator)},n.prototype.eadd=function(e,t){var n=new r(e,t);return n.iterator=this.E.push(n),n.uiterator=e.E.push(n),e!==t&&(n.viterator=t.E.push(n)),n},n.prototype.edel=function(e){this.E.erase(e.iterator),e.u.E.erase(e.uiterator),e.u!==e.v&&e.v.E.erase(e.viterator)},n.prototype.vitr=regeneratorRuntime.mark(function i(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.V,"t0",1);case 1:case"end":return e.stop()}},i,this)}),n.prototype.iitr=regeneratorRuntime.mark(function o(e){return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.delegateYield(e.E,"t0",1);case 1:case"end":return t.stop()}},o,this)}),n.prototype.nitr=regeneratorRuntime.mark(function s(e){var r,n,a,i,o,u,c,p;return regeneratorRuntime.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:r=!0,n=!1,a=t,s.prev=3,i=e.E[Symbol.iterator]();case 5:if(r=(o=i.next()).done){s.next=14;break}return u=o.value,c=u.u,p=u.v,s.next=11,c===e?p:c;case 11:r=!0,s.next=5;break;case 14:s.next=20;break;case 16:s.prev=16,s.t0=s["catch"](3),n=!0,a=s.t0;case 20:s.prev=20,s.prev=21,!r&&i["return"]&&i["return"]();case 23:if(s.prev=23,!n){s.next=26;break}throw a;case 26:return s.finish(23);case 27:return s.finish(20);case 28:case"end":return s.stop()}},s,this,[[3,16,20,28],[21,,23,27]])}),n.prototype.eitr=regeneratorRuntime.mark(function u(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.delegateYield(this.E,"t0",1);case 1:case"end":return e.stop()}},u,this)}),n.prototype.edges=regeneratorRuntime.mark(function c(){var e,r,n,a,i,o;return regeneratorRuntime.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:e=!0,r=!1,n=t,s.prev=3,a=this.eitr()[Symbol.iterator]();case 5:if(e=(i=a.next()).done){s.next=12;break}return o=i.value,s.next=9,[o.u,o.v,o];case 9:e=!0,s.next=5;break;case 12:s.next=18;break;case 14:s.prev=14,s.t0=s["catch"](3),r=!0,n=s.t0;case 18:s.prev=18,s.prev=19,!e&&a["return"]&&a["return"]();case 21:if(s.prev=21,!r){s.next=24;break}throw n;case 24:return s.finish(21);case 25:return s.finish(18);case 26:case"end":return s.stop()}},c,this,[[3,14,18,26],[19,,21,25]])}),n.prototype.incident=regeneratorRuntime.mark(function p(e){var r,n,a,i,o,s;return regeneratorRuntime.wrap(function(u){for(;;)switch(u.prev=u.next){case 0:r=!0,n=!1,a=t,u.prev=3,i=this.iitr(e)[Symbol.iterator]();case 5:if(r=(o=i.next()).done){u.next=12;break}return s=o.value,u.next=9,[s.u,s.v,s];case 9:r=!0,u.next=5;break;case 12:u.next=18;break;case 14:u.prev=14,u.t0=u["catch"](3),n=!0,a=u.t0;case 18:u.prev=18,u.prev=19,!r&&i["return"]&&i["return"]();case 21:if(u.prev=21,!n){u.next=24;break}throw a;case 24:return u.finish(21);case 25:return u.finish(18);case 26:case"end":return u.stop()}},p,this,[[3,14,18,26],[19,,21,25]])}),n.prototype.endpoints=function(e){return[e.u,e.v]},n};e.List=n;var a=function(e){this.iterator=null,this.E=e};return e.Vertex=a,e};"object"==typeof exports?e(exports):"function"==typeof define&&define.amd?define("aureooms-js-adjacency-list",[],function(){return e({})}):"object"==typeof window&&"object"==typeof window.document?e(window.adjacencylist={}):console.error("unable to detect type of module to define for aureooms-js-adjacency-list")}();
//# sourceMappingURL=js/dist/adjacency-list.js.map

@@ -24,3 +24,3 @@

// remove all incident edges
for ( let e of this.eitr( v ) ) this.edel( e ) ;
for ( let e of this.iitr( v ) ) this.edel( e ) ;

@@ -69,3 +69,3 @@ // remove vertex

Graph.prototype.eitr = function* ( v ) {
Graph.prototype.iitr = function* ( v ) {

@@ -82,3 +82,3 @@ yield* v.E ;

Graph.prototype.aeitr = function* ( ) {
Graph.prototype.eitr = function* ( ) {

@@ -89,2 +89,20 @@ yield* this.E ;

Graph.prototype.edges = function* ( ) {
for ( let e of this.eitr( ) ) yield [ e.u , e.v , e ] ;
} ;
Graph.prototype.incident = function* ( v ) {
for ( let e of this.iitr( v ) ) yield [ e.u , e.v , e ] ;
} ;
Graph.prototype.endpoints = function ( e ) {
return [ e.u , e.v ] ;
} ;
return Graph ;

@@ -91,0 +109,0 @@

{
"main": "js/dist/adjacency-list.js",
"version": "1.0.0",
"version": "2.0.0",
"bugs": {

@@ -5,0 +5,0 @@ "url": "https://github.com/aureooms/js-adjacency-list/issues"

Sorry, the diff of this file is not supported yet

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