New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@buggyorg/graphtools

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@buggyorg/graphtools - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

7

lib/walk.js

@@ -38,4 +38,9 @@ 'use strict';

/**
* returns all pathes tracked by the path that defines the ports.
* The path will be pointing to node (node will be the last item of the result)
* it follows the direction of the directed edges
*/
function walkBack(graph, node, path) {
return generalWalk(graph, node, path, predecessor);
return _lodash2.default.map(generalWalk(graph, node, path, predecessor), _lodash2.default.reverse);
}

@@ -42,0 +47,0 @@

2

package.json
{
"name": "@buggyorg/graphtools",
"version": "0.2.0",
"version": "0.2.1",
"description": "Tools for processing buggy graphs.",

@@ -5,0 +5,0 @@ "main": "lib/api.js",

@@ -20,4 +20,9 @@

/**
* returns all pathes tracked by the path that defines the ports.
* The path will be pointing to node (node will be the last item of the result)
* it follows the direction of the directed edges
*/
export function walkBack (graph, node, path) {
return generalWalk(graph, node, path, predecessor)
return _.map(generalWalk(graph, node, path, predecessor), _.reverse)
}

@@ -24,0 +29,0 @@

@@ -85,3 +85,3 @@ /* global describe, it */

expect(path).to.have.length(1)
expect(path[0]).to.deep.equal(['2_STDOUT', '1_INC', '0_STDIN'])
expect(path[0]).to.deep.equal(['0_STDIN', '1_INC', '2_STDOUT'])
})

@@ -110,4 +110,4 @@

expect(path).to.have.length(2)
expect(path[0][1]).to.be.oneOf(['1_INC', '4_CONST1'])
expect(path[1][1]).to.be.oneOf(['1_INC', '4_CONST1'])
expect(path[0][0]).to.be.oneOf(['1_INC', '4_CONST1'])
expect(path[1][0]).to.be.oneOf(['1_INC', '4_CONST1'])
})

@@ -143,5 +143,5 @@

expect(path).to.have.length(2)
expect(path[0][1]).to.be.oneOf(['1_INC', '4_CONST1'])
expect(path[1][1]).to.be.oneOf(['1_INC', '4_CONST1'])
expect(path[0][0]).to.be.oneOf(['1_INC', '4_CONST1'])
expect(path[1][0]).to.be.oneOf(['1_INC', '4_CONST1'])
})
})
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