
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.
procedural-map
Advanced tools
Two-dimensional maps generator using procedural generation from a seed.
Two-dimensional maps generator using procedural generation from a seed. For seedless random generation, check out random-walk-map.
Install via npm:
$ npm install --save procedural-map
Call the function exposed by the package to generate a two-dimensional map with connected paths. It returns a matrix (an array of arrays), where each postion contains 0 (default) or 1 (a path).
let generateMap = require('procedural-map');
//Generate a map with default config
let map = generateMap("some-seed");
/* Example output:
* map =[[0, 0, 0, 0, 1],
* [0, 0, 0, 0, 1],
* [0, 1, 1, 0, 1],
* [0, 0, 1, 1, 1],
* [0, 0, 0, 0, 0]]
*/
The generator can take a config object as second parameter, with any of the following parameters:
let map = generateMap("some-seed", {
numberOfPaths: 10, //Number of paths to draw
minPathLength: 1, //Minimal length of a path
maxPathLength: 5, //Maximal length of a path
maxWidth: 24, //Maximum width of the map - x index will go from 0 to 23
maxHeight: 18, //Maximum height of the map - y index will go from 0 to 17
startPosition: {x: 0, y: 0} //Position at which random walk is started
});
FAQs
Two-dimensional maps generator using procedural generation from a seed.
We found that procedural-map 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.