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

@paybase/machine

Package Overview
Dependencies
Maintainers
9
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paybase/machine - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

2

package.json
{
"name": "@paybase/machine",
"version": "1.0.4",
"version": "1.0.5",
"description": "async/await finite state machine factory",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -44,13 +44,12 @@ const {

const shortestPath = (joins) => {
function recurse(from, to, visited = new Set(), arr = [ to ]) {
return !visited.has(to)
function recurse(from, to, visited = [], arr = [ to ]) {
return !visited.includes(to)
? joins
.filter(([ , v ]) => v.includes(to))
.reduce((acc, [ k ]) => {
visited.add(to);
return k !== from
? acc.concat(recurse(from, k, visited, [ k ].concat(arr)))
? acc.concat(recurse(from, k, [ to, ...visited ], [ k ].concat(arr)))
: acc.concat([ [ k ].concat(arr) ]);
}, [])
.sort((a, b) => a.length > b.length)
.sort((a, b) => a.length - b.length)
: [];

@@ -68,3 +67,3 @@ }

const recurse = shortestPath(joins);
// if a path is found, get pairs of the sequence, ie. [ [ A, B ], [ B, C ] ]

@@ -71,0 +70,0 @@ const getPathPairs = x => !x.some(y => y === undefined)

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