Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Generic synchronous A* search algorithm.
var aStar = require('a-star');
// if this is going to take a while you may want to child_process.fork
// and pass the results to the parent process
// see below for options
var path = aStar(options);
console.log(path);
aStar(options)
Returns an object that looks like this:
{
status: 'success', // one of ['success', 'noPath', 'timeout']
path: [startNode, node1, node2, ..., endNode],
}
If status
is:
success
- a path was found and path
is an array of nodes including start
and end.noPath
- there is no path from start to end. path
is the path to the
closest node to end that could be found.timeout
- no path was found in the allotted time. path
is the path to
the closest node that could be found in the allotted time.start
- the start nodeisEnd
- function(node) that returns whether a node is an acceptable endneighbor
- function(node) that returns an array of neighbors for a nodedistance
- function(a, b) that returns the distance cost between two
nodesheuristic
- function(node) that returns a heuristic guess of the cost
from node
to an end.hash
- function(node) that returns a unique string for a node. this is
so that we can put nodes in heap and set data structures which are based
on plain old JavaScript objects. Defaults to using node.toString
.timeout
- optional limit to amount of milliseconds to search before
returning null.The data type for nodes is unrestricted.
FAQs
Generic synchronous A* search algorithm
The npm package a-star receives a total of 567 weekly downloads. As such, a-star popularity was classified as not popular.
We found that a-star demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.