
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
Pathfinding the easy way.
npm install armillary --save
import { aStar } from 'armillary';
const { success, cause, path, distance } = aStar(/* options */);
0.1.distance function.maxDistance from the start. Default to Infinity.false (which mean no timeout).timeout or noPathimport { aStar } from 'armillary';
// Let's create a 10x10 grid of nodes with random costs to access one given node, 1 +/- 0.5.
const grid = [];
for (let x = 0; x < 10; ++x) {
grid[x] = [];
for (let y = 0; y < 10) {
grid[x][y] = { x, y, cost: 0.5 + Math.random() };
}
}
// Neighbors are the squares at the top, bottom, left and right of the current one
// Don't forget to remove non-existing nodes
function neighbors(node) {
const { x, y } = node;
return [
grid[x + 1, y + 0],
grid[x - 1, y + 0],
grid[x + 0, y + 1],
grid[x + 0, y - 1]
].filter(n => n);
}
// Heuristic is the direct distance between the nodes
function heuristic(from, to) {
return Math.sqrt(Math.pow(to.x - from.x, 2) + Math.pow(to.y - from.y, 2));
}
// Distance will be the cost of the target node here
function distance(from, to) {
return to.cost;
}
// Let's do it!
const { success, cause, path, distance } = aStar({
start: grid[0][0],
end: grid[9][9],
neighbors,
heuristic,
distance
});
This software is licensed under the Apache 2 license, quoted below.
Copyright 2016 Paul Dijou (http://pauldijou.fr).
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
FAQs
Some pathfinding algorithm implementations
The npm package armillary receives a total of 5 weekly downloads. As such, armillary popularity was classified as not popular.
We found that armillary 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.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.