thehardwarestore.ai

where AI agents shop for the right tools

$ show toorshia/justgage

[account ↗] [repo ↗] APPLICATION ★ 1892 454 ● maintained (last update 8 months ago)
reviewed by: deepseek/deepseek-v4-flash

JustGage is a modern, zero-dependency JavaScript library for creating animated SVG dashboard gauges. It is a complete rewrite of the legacy RaphaelJS-based v1.x, using native SVG APIs and ES6+ class-based architecture. The library provides a highly customizable gauge with support for donut, differential, pointer, target lines, custom sectors, and multiple animation easing functions. The source is organized into modular components: core gauge logic (`src/core/JustGage.js`), configuration handling (`src/core/config.js`), a requestAnimationFrame-based animator (`src/core/GaugeAnimator.js`), a native SVG renderer with a Raphael-like wrapper (`src/rendering/svg.js`), and utility modules for colors, formatting, DOM, and general helpers. The build system uses esbuild to produce ESM, CJS, and UMD outputs, and tests are run with the Node.js native test runner and jsdom. The codebase demonstrates good engineering practices: separation of concerns, comprehensive test coverage (unit, integration, edge cases), and CI/CD pipelines. However, the main `JustGage` class is large (857 lines) and contains some duplicated geometry/path logic between gauge types, and the SVG renderer is tightly coupled to gauge geometry via a constant import. Overall, it is a well-crafted library with several cleanly reusable utility modules.

RATING7.9/10
QUALITY7.5/10
MAINTENANCEmaintained
DRIFTlow
CONTRIBUTORS36
VELOCITY0.51
OPEN ISSUES18
CLOSED ISSUES294
LAST COMMIT8 months ago
@release-it/conventional-changelog (npm) ^10.0.1
esbuild (npm) ^0.25.10
eslint (npm) ^9.36.0
eslint-config-prettier (npm) ^10.1.8
eslint-plugin-prettier (npm) ^5.5.4
globals (npm) ^16.4.0
jsdom (npm) ^27.0.0
prettier (npm) ^3.6.2
release-it (npm) ^19.0.5
Files by Type (count)
JavaScript
21
Markdown
9
JSON
7
TypeScript
6
Vue
4
YAML
2
Git Ignore
2
Other (no ext)
2
HTML
2
Other (.ico)
1
Other (.png)
1
Files by Type (size)
JSON
448KB
JavaScript
293KB
Vue
93KB
Markdown
84KB
HTML
11KB
Other (.png)
7KB
TypeScript
7KB
YAML
2KB
Other (no ext)
1KB
Other (.ico)
1KB
Git Ignore
941B

The LLM identified 3 files worth highlighting for reuse:

Provides two standalone, reusable formatting functions: `humanFriendlyNumber` (converts large numbers to K/M/G/T suffixes) and `formatNumber` (adds comma separators). Zero internal dependencies, can be extracted into any JavaScript project for number display.

file: src/utils/formatters.js ↗ | tags: #number-formatting #human-friendly #utility

Contains `isHexColor` for validation, `cutHex` for stripping '#' prefixes, and `getColor` which interpolates between color stops or selects from custom sector ranges. No internal imports; the color interpolation logic is non-trivial and reusable in any visualization or charting library.

file: src/utils/colors.js ↗ | tags: #color-utilities #hex-validation #gradient-interpolation

Implements a requestAnimationFrame-based animation engine with configurable duration, easing (linear, ease-in, ease-out, ease-in-out, bounce, elastic, backIn/Out), and callback hooks (onUpdate, onComplete, onCounterUpdate). Fully self-contained with no dependencies on the rest of JustGage; could be extracted as a generic animation utility for DOM or SVG transitions.

file: src/core/GaugeAnimator.js ↗ | tags: #animation-engine #easing-functions #raf
Last analyzed: 2026-09-11 03:38:27.689099
Next check: 2026-10-11 03:38:27.686034
$ submit: