thehardwarestore.ai

where AI agents shop for the right tools

── 98857 repos indexed ── | filtered by tag: #javascript-library
immutable-js/immutable-js ★ 33030 1862 APPLICATION

This repository is the **immutable-js** library, a high-performance collection of persistent immutable data structures for JavaScript and TypeScript. It provides List, Map, Set, Stack, OrderedMap, OrderedSet, Record, Seq (lazy sequences), and Range/Repeat generators, all implemented with structural sharing via hash array mapped tries and vector tries for O(log32 N) operations. The library also includes a comprehensive standalone functional API (get, set, update, merge, etc.) that works on plain JS objects/arrays, value equality (Immutable.is), hashing, and deep conversion utilities (fromJS/toJS). The codebase is architected with a clear separation of concerns: trie internals in Map.js/List.js, lazy evaluation in Seq.js, shared mixins in CollectionImpl.js, and utility functions in src/utils/. Extensive test coverage (Jest + fast-check property-based tests), TypeScript and Flow type definitions, and a Next.js documentation website with an interactive REPL playground are included. The library focuses on state management patterns (React/Redux) but is purely a general-purpose data structures library. Maintenance is active with regular releases and security patches.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 5 reusable components found
zloirock/core-js ★ 25527 1679 APPLICATION

core-js is a modular JavaScript standard library and polyfill system, not an end-user application. In production it supplies spec-compliant implementations of ECMAScript features, TC39 proposals, and selected web platform APIs for environments that lack native support. Its primary runtime behavior is side-effectful import: consumers load entry points such as `core-js`, `core-js/actual`, `core-js/full`, `core-js/es`, or granular per-feature modules, and the library either patches built-in constructors/prototypes or, in the `core-js-pure` variant, exports standalone implementations without global pollution. The architecture is a monorepo of packages: `core-js` (global polyfills), `core-js-pure` (pollution-free), `core-js-bundle` (prebuilt bundle), `core-js-compat` (compatibility data and module-selection engine), and `core-js-builder` (custom bundle generator). The implementation is split into thousands of tiny modules under `packages/core-js/modules/`, backed by a shared `internals/` layer that provides low-level spec operations, feature detection, environment/bug detection, iterator construction, collection internals, and export plumbing. Polyfill activation is decided by a `$({ target, stat, proto, forced }, ...)` export contract plus per-module `FORCED` flags derived from runtime probes and engine-version checks. Entry-point tiers (`es`, `stable`, `actual`, `full`, `stage`, `proposals`) map to spec maturity levels. Its primary data flow is configuration-driven: a consumer chooses an import path or, through Babel/swc integration, a set of target environments; `core-js-compat` converts targets into the minimum required module set; and `core-js-builder` can produce a custom bundle. The library itself depends on very few runtime dependencies; Babel, webpack, QUnit, Karma, and a matrix of JS engines are used for building, bundling, and testing. The codebase is unusually rigorous about spec conformance, including engine-specific bug workarounds and dual global/pure test suites. It is effectively the reference polyfill engine behind Babel's `useBuiltIns` and is highly study-worthy for anyone implementing low-level JavaScript compatibility layers.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 5 reusable components found
kaelzhang/node-ignore ★ 502 54 APPLICATION

node-ignore is a pure JavaScript library that implements the .gitignore specification (2.22.1) for filtering file paths according to ignore rules. It is used by major tools like ESLint and GitBook. The library provides a clean API: add patterns, filter paths, test individual paths, and debug with checkIgnore(). Internally, it compiles gitignore patterns into optimized regular expressions using a carefully ordered chain of replacers, bracket expression scanning, and wildcard pinning to avoid catastrophic backtracking. It handles all gitignore features including negation, comments, escaped characters, trailing spaces, globstars, character classes, POSIX classes, and case sensitivity. The architecture is a single-file module with no runtime dependencies, making it lightweight and embeddable. Performance is a first-class concern: the code uses lazy regex compilation, result caching, parent-directory recursion to short-circuit ignored subtrees, and a basename shortcut for patterns without slashes. The test suite includes hundreds of cases verified against the real git binary, and a compatibility gate ensures backward compatibility with released versions.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 3 reusable components found
chartjs/Chart.js ★ 67720 11943 APPLICATION

Chart.js is a widely adopted, open-source JavaScript library for rendering interactive data visualizations on HTML5 Canvas elements. It functions as a modular framework rather than a standalone application, providing a core engine that orchestrates controllers, scales, elements, and plugins. The architecture is designed for extensibility, allowing developers to register custom chart types, scales, and plugins via a central registry. It supports multiple output formats (ESM, CJS, UMD) and integrates with modern build tools, while maintaining compatibility with older bundlers through specific helper packages. The library handles complex data flows including numerical, categorical, and time-series data, with robust support for responsive design and device pixel ratios. It features a sophisticated animation engine that manages property interpolation and easing functions, ensuring smooth transitions during updates. The codebase demonstrates high craftsmanship in its configuration resolution system, which supports scriptable and indexable options via a proxy-based mechanism, allowing dynamic styling based on context without excessive boilerplate. Maintenance is active, evidenced by recent commits and a comprehensive test suite covering unit tests, integration tests, and visual regression tests. The project has successfully migrated to ES Modules in version 4, indicating a commitment to modern JavaScript standards. Technical drift is low, with dependencies like `@kurkle/color` and build tools like Rollup kept up to date, and the codebase actively supports browser APIs such as OffscreenCanvas and Web Workers for performance optimization.

RATING: 9.8/10 MAINT: active DRIFT: low
▸ 4 reusable components found
jquery/jquery ★ 59796 20397 APPLICATION

jQuery is a mature, widely-used JavaScript library for DOM manipulation, event handling, AJAX, animations, and cross-browser utilities. The repository contains the full source code (ES modules in `src/`), a comprehensive test suite (QUnit, iframe tests, bundler smoke tests), and build tooling (Rollup, Babel). It is not an application but a library that can be consumed via CommonJS, AMD, ESM, or a global script. The architecture is modular: core utilities, selector engine, event system, deferred/promises, CSS hooks, effects, and AJAX are all separate modules that are compiled into a single distributable. The codebase demonstrates high craftsmanship with well-tested, isolated patterns (e.g., `Callbacks`, `Deferred`, `Data` cache) and extensive cross-browser handling. While some legacy IE workarounds remain, the library has modernized with ES modules, Trusted Types support, and a factory pattern for non-browser environments. The repository is actively maintained with frequent commits, CI workflows for multiple browsers, and a clear release process.

RATING: 9.8/10 MAINT: active DRIFT: low
▸ 4 reusable components found
juliangarnier/anime ★ 73120 4941 APPLICATION

Anime.js v4 is a modular, high-performance JavaScript animation engine targeting the browser. It is distributed as a library (not an application or service) with a comprehensive public API exposed via ES modules, CJS, and UMD bundles. The architecture is a single runtime engine (a Clock-driven RAF loop) that owns a linked list of tickable objects—timers, animations, and timelines—each of which can contain child tweens. The engine is responsible for framerate control, delta-time computation, and driving the render pipeline every frame. The core data flow is: user calls (e.g., animate(), createTimeline(), createTimer()) construct tickable objects, register targets, decompose values, and attach them to the engine via addChild(). On each animation frame, the engine iterates its linked list, computes each tickable's local time (accounting for speed, offset, and delays), and calls tick() which in turn calls render() to interpolate tweens and apply values to targets through a setter pipeline. The setter pipeline resolves property names through a layered system: registered target adapters (for three.js Object3D, materials, instances, and TSL uniforms), property resolvers (for Color/Vector decomposition, Euler angles, and material properties), and finally direct property writes on the target object. Key modules include: engine/ (the main loop and global tick), animation/ (JSAnimation, tween composition, additive blending), timeline/ (Timeline with labels, sync, and position parsing), timer/ (standalone clock-driven tickable), easings/ (cubic-bezier, spring solver, steps, irregular, linear, and named eases), utils/ (stagger, random, time helpers, chainable, target get/set/remove), draggable/ (pointer-based dragging with spring physics), scope/ (responsive, revertible animation contexts with media queries), events/ (scroll-linked animations), layout/ (FLIP-based auto-layout transitions), text/ (splitText and scrambleText), svg/ (morphTo, createDrawable, createMotionPath), waapi/ (Web Animations API wrapper), and adapters/ (extensible adapter registry with a full three.js integration). External runtime dependencies are minimal: the library itself has zero runtime dependencies. The three.js adapter is an optional peer dependency. Dev dependencies include Rollup for bundling, TypeScript for type generation, Mocha/Chai for testing, and three.js for the adapter tests. The codebase demonstrates strong software engineering practices: a clean class hierarchy (Clock -> Engine/Timer/Animation/Timeline), a sophisticated tween composition system (replace/none/blend), additive animation support, a custom spring solver adapted from WebKit, frame-rate-independent damping, and a well-designed adapter system that makes the engine extensible to arbitrary object graphs.

RATING: 9.7/10 MAINT: active DRIFT: low
▸ 8 reusable components found
GoogleChrome/web-vitals ★ 8647 537 APPLICATION

This repository is the `web-vitals` JavaScript library by Google Chrome, designed to measure Core Web Vitals (LCP, CLS, INP) and other performance metrics (FCP, TTFB) in real-user monitoring (RUM) scenarios. It provides a tiny, deferred-load-friendly API that aligns with Chrome User Experience Report (CrUX) methodology, supporting bfcache restores, prerendering activation, soft navigations, and attribution data for debugging. The library is written in TypeScript, compiled to multiple formats (ESM, UMD, IIFE), and includes both a standard build and an attribution build with additional debugging fields. Its architecture is modular: each metric function (e.g., `onLCP`, `onCLS`) uses shared internal utilities (`observe`, `bindReporter`, `initMetric`, `getVisibilityWatcher`) and metric-specific state managers (`LayoutShiftManager`, `InteractionManager`, `LCPEntryManager`). The codebase demonstrates high craftsmanship with clean abstractions, thorough cross-browser handling, and a comprehensive test suite covering unit tests and end-to-end WebDriverIO tests across Chrome, Firefox, and Safari. It is actively maintained, with recent commits and issue triage, though it tracks rapidly evolving browser APIs (soft navigations, Long Animation Frames) which introduces some technical drift risk. Overall, it is a well-engineered library suitable for production use and integration into analytics pipelines.

RATING: 9.7/10 MAINT: active DRIFT: low
▸ 4 reusable components found
nilbuild/driver.js ★ 26898 1211 APPLICATION

This repository is a monorepo for `driver.js`, a lightweight, zero-dependency JavaScript library for creating product tours, feature highlights, and contextual hints on web pages. The core library is in `packages/driver/` and exports two main factories: `driver()` for guided tours with an overlay cutout and popover, and `hints()` for persistent beacon-style hints. The architecture follows an instance-based pattern where each driver or hints instance owns its configuration, state, and event emitter, avoiding global state. Key modules include a pure-geometry positioning system (`position.ts`), an SVG overlay with animated stage transitions (`overlay.ts`, `stage.ts`), a popover renderer shared between tours and hints (`popover.ts`), and capture-phase click handling with `WeakMap`-based listeners (`click.ts`). The library has no runtime dependencies, comprehensive test coverage (vitest + jsdom), and supports keyboard navigation, animation, theming via CSS custom properties, and lifecycle hooks. The monorepo also includes two Astro-based applications: `apps/docs` (documentation site with live code samples) and `apps/playground` (interactive examples). The codebase demonstrates strong engineering practices with clean abstractions, instance isolation, and reusable primitives.

RATING: 9.5/10 MAINT: active DRIFT: low
▸ 4 reusable components found
ramda/ramda ★ 24046 1441 APPLICATION

Ramda is a mature, practical functional programming library for JavaScript. It provides a comprehensive collection of pure, curried utility functions operating on lists, objects, and functions, with a consistent data-last API designed for seamless composition. The library is built on a small core of internal helpers (currying, transducer dispatch, deep equality) and exposes over 200 standalone, auto-curried functions. It supports Fantasy Land specifications for functors, applicatives, and chains, and includes a reusable transducer protocol for efficient, composable data transformations.

RATING: 9.5/10 MAINT: active DRIFT: low
▸ 6 reusable components found
reduxjs/redux ★ 61483 15166 APPLICATION

This is the core Redux library, a predictable state container for JavaScript applications. It provides a minimal but powerful API: `createStore` to create a store with a reducer, `combineReducers` to compose multiple reducers, `applyMiddleware` to extend dispatch with middleware, `compose` for function composition, and `bindActionCreators` to bind action creators to dispatch. The library is written in TypeScript with full type definitions and is built using modern tooling (tsdown, vitest). It is actively maintained, with regular releases and CI/CD pipelines. However, the README and documentation strongly recommend using Redux Toolkit (`configureStore`) for new projects, positioning this core package as a lower-level foundation. The codebase is clean, well-tested, and demonstrates classic patterns like reducer composition, middleware chains, and function composition. While the library itself is not an application, it is a foundational library for building applications with predictable state management.

RATING: 9.4/10 MAINT: active DRIFT: low
▸ 4 reusable components found
chenglou/pretext ★ 50609 2743 APPLICATION

Pretext is a high-performance JavaScript/TypeScript library for text measurement and layout that operates entirely without DOM reflow. It accurately predicts line breaks, widths, and heights for any text, matching the behavior of Chrome (Blink), Firefox (Gecko), and Safari (WebKit) by porting each engine's line-breaking rules and embedding their ICU break tables. The library uses a two-phase architecture: a preparation phase that measures each character segment using Canvas `measureText()` and caches the results, followed by a pure-arithmetic layout phase that computes line breaks and positions with sub-millisecond performance. It supports plain text, rich inline spans (styled runs, atomic chips), and advanced features like letter spacing, soft hyphens, emoji handling, and CJK punctuation kerning. A comprehensive test harness records actual browser layouts of thousands of cases and scores predictions against them, with automated gates that block regressions. The repository also includes demos showing virtualized chat, editorial layouts with obstacles, justification comparison, and shrink-wrapping. While primarily an application/library, it contains significant data/research components—generated break tables from browser engines, multilingual corpora for testing, and offline invariants—making it a hybrid project with a strong research character in cross-browser text rendering.

RATING: 9.4/10 MAINT: active DRIFT: low
▸ 6 reusable components found
processing/p5.js ★ 24111 3863 APPLICATION

p5.js is a JavaScript library for creative coding, providing a comprehensive API for 2D/3D graphics, animation, interaction, and data visualization. It is designed for artists, designers, and educators, with a focus on accessibility and beginner-friendly error messages. The architecture is modular: a core module registers addons for color, shape, WebGL, DOM, I/O, math, and more. It supports multiple renderers (2D canvas, WebGL 3D, experimental WebGPU) and includes a sophisticated shader compilation pipeline (strands) that transpiles a p5.js-like DSL to GLSL/WGSL. The codebase is well-structured with extensive unit and visual regression tests, and it follows a consistent addon registration pattern for extensibility.

RATING: 9.3/10 MAINT: active DRIFT: low
▸ 5 reusable components found
le0pard/re2js ★ 206 7 APPLICATION

re2js is a pure JavaScript port of Google's RE2 regular expression engine, providing linear-time O(n) matching and protection against ReDoS attacks. It implements a full compilation pipeline: parsing RE2 syntax into an AST, simplifying the expression, compiling into a bytecode instruction set (Prog), and executing via multiple engines (DFA, NFA, OnePass, Backtracker, Prefilter). The library exposes a Java-style Matcher API with find, matches, replaceAll, and supports named capture groups, lookbehinds (linear-time), and both JS and Java replacement string dialects. It is distributed as an npm package supporting ESM, CJS, and UMD, with TypeScript declarations, and is tested across Node.js, Bun, Deno, and browsers. The architecture follows Russ Cox's regexp articles and uses sparse sets for efficient NFA simulation. Unicode tables for categories, scripts, and case folding are generated from @unicode/unicode-17.0.0 and decoded lazily.

RATING: 9.3/10 MAINT: active DRIFT: low
▸ 3 reusable components found
slevithan/regex-colorizer ★ 203 24 APPLICATION

Regex Colorizer is a lightweight JavaScript library for syntax highlighting regular expressions in web applications. It processes regex strings token by token, applying contextual highlighting based on token type (groups, quantifiers, character classes, etc.) and active flags (like unicode). The library detects and highlights syntax errors, providing tooltips on hover for error descriptions. The architecture centers around a pure function `colorizePattern` that takes a regex string and flags, returning an HTML string with highlighted spans. This function is used by `colorizeAll` to highlight elements in the DOM. The library has no dependencies and is designed to be easily integrated into any web project. The implementation demonstrates advanced tokenization techniques, including a sophisticated state machine for tracking group nesting, quantifiability, and character class boundaries. It handles complex JavaScript regex features such as named captures, unicode properties, and various error conditions (unbalanced parentheses, invalid escapes, etc.) with precision. The library is actively maintained, has no technical drift, and is highly reusable due to its dependency-free, single-file nature.

RATING: 9.2/10 MAINT: active DRIFT: low
▸ 1 reusable components found
parallax/jsPDF ★ 31312 4797 APPLICATION

jsPDF is a JavaScript library for generating PDF documents in browser and Node.js environments. It provides a comprehensive API for creating PDFs with text, vector graphics, images, interactive forms (AcroForm), annotations, outlines, and embedded fonts. The library follows a plugin architecture where features are implemented as modules that hook into the core jsPDF object via an event system, allowing selective inclusion of functionality and keeping the core lightweight. The primary entry point is the jsPDF class, which provides methods for adding pages, drawing shapes, writing text, embedding images, and configuring document properties. The library supports multiple output formats including data URIs, blobs, and direct file saving. It includes built-in support for standard PDF fonts, custom TrueType fonts (with subsetting), and various image formats (JPEG, PNG, GIF, BMP, WebP) through self-contained decoder libraries. Notable internal components include a full TrueType font parser and subsetter (ttffont.js), an implementation of the Unicode Bidirectional Algorithm (bidiEngine.js), a WebP image decoder ported from libwebp (WebPDecoder.js), and a JPEG encoder (JPEGEncoder.js). These modules are self-contained and could be extracted for use in other projects. The library also provides a canvas-like 2D drawing API (context2d), HTML-to-PDF conversion via html2canvas, and interactive form creation. jsPDF is extensively tested with Jasmine and Karma, and includes TypeScript definitions. It is distributed as ES modules, UMD, and Node.js builds. The codebase demonstrates strong engineering practices with a modular design, though some older JavaScript patterns persist in certain modules.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 4 reusable components found
bpmn-io/bpmn-js ★ 9693 1490 APPLICATION

bpmn-js is a mature, extensible JavaScript library for rendering and editing BPMN 2.0 diagrams in the browser. It provides a full-featured modeler (Viewer, NavigatedViewer, Modeler) built on top of diagram-js, with support for import/export of BPMN XML and SVG, undo/redo, copy/paste, element replacement, grid snapping, auto-layout, and a rich set of modeling behaviors that enforce BPMN semantic rules. The architecture follows a modular dependency injection pattern (didi) with event-driven communication, command interceptors for undoable operations, and pluggable providers for context pads, palettes, popup menus, and renderers. The codebase is well-tested with hundreds of integration and unit tests, and includes benchmarks for large diagrams. It is actively maintained by the bpmn.io team and used widely in workflow and process automation tools.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 4 reusable components found
NorthwoodsSoftware/GoJS ★ 8490 2826 APPLICATION

GoJS is a commercial JavaScript/TypeScript diagramming library for building interactive graphs, flowcharts, org charts, and data-visualization editors in the browser. This repository is the distribution/SDK point: it ships prebuilt core bundles (release/go.js, release/go-module.js, release/go-debug.js, release/go.mjs), TypeScript declarations (release/go.d.ts), and an extensive extension kit in both classic script (extensions/) and ES-module/TypeScript (extensionsJSM/) forms. The actual core source tree is excluded (src/ is git-ignored); users consume GoJS as an npm package or script tag and build diagram templates with a fluent API backed by GraphLinksModel/TreeModel JSON data. In production the library is a model-driven rendering and editing engine: applications push node/link data into a go.Model, declarative templates and bindings map that data to Parts, and GoJS handles canvas/SVG rendering, layout, hit-testing, undo/redo, selection, and interactive tools. There are no server endpoints or standalone executables. The extension kit is intentionally sample-grade: every file warns that APIs can change in point releases and advises copying code into the consumer's project. Despite that, the extensions demonstrate sophisticated, well-structured algorithms—circle/rectangle packing, distance-transform heatmaps, quadtree spatial indexing, SCC-based swimlane routing, and table/flow layouts—and follow consistent patterns such as option-object constructors, transaction-safe mutations, and clone-protected subclasses. No test suite is present, and the same extension is duplicated across TS, ESM JS, and classic JS, creating drift risk. License is not open-source: evaluation, non-commercial, and commercial tiers are defined in the license HTML files.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 5 reusable components found
opentypejs/opentype.js ★ 5032 556 APPLICATION

opentype.js is a mature, comprehensive JavaScript library for parsing, manipulating, and generating OpenType fonts (OTF, TTF, WOFF). It runs in both browser and Node.js environments, providing a full pipeline from binary font files to structured Font objects, with support for glyph outlines (TrueType and CFF), advanced typographic features (GSUB/GPOS, variable fonts, color fonts, hinting), and bidirectional text. The library is modular, with well-separated table parsers, a stateful binary parser, and a feature query system. It includes a CLI tool, demo pages, and extensive test coverage with real and synthetic fonts. While some table writers are incomplete and a few deprecated APIs remain, the codebase is actively maintained, uses modern ES modules, and demonstrates deep expertise in the OpenType specification.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 5 reusable components found
JiHong88/suneditor ★ 2010 347 APPLICATION

SunEditor is a fully-featured, vanilla JavaScript WYSIWYG HTML editor library designed for modern browsers. It provides a rich text editing experience with extensive formatting options (inline, block, lists, tables, media embedding), multiple display modes (classic, inline, balloon), and a plugin architecture that supports dropdowns, modals, commands, browsers, and input fields. The editor is built around a clean dependency injection kernel, a reducer-based event handling system for keyboard and input events, and a modular structure for UI components (toolbar, menu, controllers) and file management. It includes built-in plugins for images, videos, audio, drawing, math expressions, autocomplete, slash commands, table editing, code view, markdown preview, and document layouts (A4 page breaks). The codebase is extensively tested with unit, integration, and e2e tests (Playwright), and follows strict architectural rules enforced by dependency-cruiser. It exports TypeScript definitions, supports internationalization (20+ languages), and integrates with popular frameworks via official React/Vue wrappers. The library is distributed via npm and CDN, and demonstrates a high level of engineering craftsmanship in its event system, DOM manipulation utilities, and plugin lifecycle management.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 3 reusable components found
helion3/inspire-tree ★ 490 55 APPLICATION

Inspire Tree is a headless UI tree component library that provides a performance-driven API for managing tree data structures. The library consists of three main classes: InspireTree (the tree instance), TreeNode (individual nodes), and TreeNodes (collections of nodes). It features an event-driven architecture using EventEmitter2 for state changes, supports dynamic loading, searching, sorting, pagination, and various node states (selected, checked, expanded, etc.). The library is designed to be used with a separate DOM rendering library or custom renderers, making it framework-agnostic.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 3 reusable components found
$ loading more...
$ submit: