
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
node-pathfinding
Advanced tools
a Node.JS implementation for AStar path finding algorithm. This implementation uses primitive data types (Number and Byte/Buffer) to present location and block data that significantly improve the speed and have a good control on memory consumption
This is a Node.JS implementation for AStar path finding algorithm. This implementation uses primitive data types (Number and Byte/Buffer) to present location and block data that significantly improve the speed and have a good control on memory consumption
npm install node-pathfinding
var array2d, buf, grid, height, path, pathfinding, width;
pathfinding = require("node-pathfinding");
array2d = [[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 0], [1, 1, 0, 0], [1, 0, 0, 0]];
width = 4;
height = 5;
// generate grid from 2D array
buf = pathfinding.bytesFrom2DArray(width, height, array2d);
grid = pathfinding.buildGrid(width, height, buf);
path = pathfinding.findPath(1, 0, 1, 4, grid);
console.log("path:" + path);
// print the path
console.log("path on grid :" + (grid.toString(1 << 16 | 0, 1 << 16 | 4, path)));
// output:
// path:65536,131072,131073,196609,196610,196611,196612,131076,65540
// path on grid :[Grid(width=4, height=5)]
// Dump: ░=walkable, ▓=blocked
// ▓S1░
// ░▓23
// ░░▓4
// ▓▓░5
// ▓E76
x << 16 | yTry node tests/sync_astar_continue_test.js
it does a continuous test of pathfinding on some map fixtures, and the vm memory recycled correctly.
FAQs
a Node.JS implementation for AStar path finding algorithm. This implementation uses primitive data types (Number and Byte/Buffer) to present location and block data that significantly improve the speed and have a good control on memory consumption
We found that node-pathfinding 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
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.