
Product
Introducing Repository Access Permissions and Custom Roles
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.
algorithm-visualizer
Advanced tools
This repository is part of the project Algorithm Visualizer.
tracers.js is a visualization library for JavaScript.
You can use it on algorithm-visualizer.org or locally on your machine.
npm install algorithm-visualizer
// import visualization libraries {
const { Array2DTracer, Layout, LogTracer, Tracer, VerticalLayout } = require('algorithm-visualizer');
// }
// define tracer variables {
const array2dTracer = new Array2DTracer('Grid');
const logTracer = new LogTracer('Console');
// }
// define input variables
const messages = [
'Visualize',
'your',
'own',
'code',
'here!',
];
// highlight each line of messages recursively
function highlight(line) {
if (line >= messages.length) return;
const message = messages[line];
// visualize {
logTracer.println(message);
array2dTracer.selectRow(line, 0, message.length - 1);
Tracer.delay();
array2dTracer.deselectRow(line, 0, message.length - 1);
// }
highlight(line + 1);
}
(function main() {
// visualize {
Layout.setRoot(new VerticalLayout([array2dTracer, logTracer]));
array2dTracer.set(messages);
Tracer.delay();
// }
highlight(0);
})();
Check out the API reference for more information.
Check out the contributing guidelines.
FAQs
Visualization Library for JavaScript
The npm package algorithm-visualizer receives a total of 35 weekly downloads. As such, algorithm-visualizer popularity was classified as not popular.
We found that algorithm-visualizer 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.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.