
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
a-star-algo
Advanced tools
A slightly opinionated, cleaned-up version of A-Star implementation
npm install a-star-algo
const aStar = require('a-star-algo')
// Abuse the fact that objects are call-by-sharing ("pass by reference" with some differences) to chain everything together.
// You have to do it this way for now, or you can submit a PR to add something like https://www.npmjs.com/package/graph-data-structure in. ;)
elements.end = {
id: 4,
neighbors: [ elements.middle1 ]
}
elements.middle1 = {
id: 2,
neighbors: [ elements.end ]
}
elements.middle2 = {
id: 3,
neighbors: []
}
elements.start = {
id: 1,
neighbors: [ elements.middle1, elements.middle2 ]
}
// These are all the parameters available or necessary
const as = new aStar({
// Which element to start from
start: elements.start,
// Which element to end at
end: elements.end,
// Heuristic for cost to go between two points
costEstimate: (to, from) => {
return 1
},
// How far apart two points are
distance: (to, from) => {
return 1
}
})
// [ 1, 2, 4 ]
const result = as.travel()
Call when you are ready to traverse
FAQs
Fairly generic A* implementation
The npm package a-star-algo receives a total of 3 weekly downloads. As such, a-star-algo popularity was classified as not popular.
We found that a-star-algo 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.