This repository provides a self-contained JavaScript library (`radar.js`) that renders an interactive 'Tech Radar' visualization using D3.js v7. The radar chart displays technology entries organized into four quadrants and four concentric rings (e.g., ADOPT, TRIAL, ASSESS, HOLD), with automatic collision-avoidance positioning via D3's force simulation. The library is used by Zalando to visualize their internal technology choices and is published as a static page. The codebase consists of a single global function (`radar_visualization`) that accepts a configuration object, making it easy to embed in any HTML page. It includes features like hover tooltips, clickable links, a legend with text wrapping, optional ring description table, and a print layout mode. The repository also contains historical release versions of the library. It is not a data pipeline or research project; it is a purely client-side visualization tool.
co2.js is a JavaScript library by the Green Web Foundation that calculates the carbon footprint of digital activities, such as data transfer and web page visits. It provides multiple emission models (OneByte, Sustainable Web Design v3/v4) and supports per-byte and per-visit calculations with optional grid intensity and green hosting factors. The library also includes utilities to check if a domain is hosted on green energy via an API or local database, and to validate carbon.txt files. It is published on npm and JSR, supports Node.js, browsers, and Deno, and bundles static grid intensity data from Ember, UNFCCC, and Electricity Maps. The architecture is modular, with separate model classes, hosting check modules, and helper utilities, making components independently testable and potentially reusable in other sustainability-focused projects. The repository also contains data generation scripts for updating grid intensity data automatically via GitHub Actions.
Backbone.js is a lightweight client-side MVC library that provides structure to web applications by offering Models with key-value binding and custom events, Collections with a rich set of enumerable methods, Views with declarative event handling, and Routers for URL-based navigation. The library is built around a core event system (Backbone.Events) that is mixed into all major components, enabling a pub/sub architecture. Data flows from user interactions or server responses through Models and Collections, which trigger change events that Views listen to and re-render. Persistence is handled via Backbone.sync, which maps CRUD operations to RESTful JSON endpoints by default, but can be overridden for custom backends (e.g., localStorage). The library depends on Underscore.js for utility functions and optionally on jQuery (or Zepto/Ender) for DOM manipulation and AJAX. The codebase is a single-file UMD module with a well-documented annotated source, and includes a debug-info module for runtime introspection. Despite its age, Backbone remains a stable, minimal foundation for building single-page applications, though its patterns (manual DOM updates, reliance on global event bus) feel dated compared to modern reactive frameworks.
qs is a JavaScript library for parsing and stringifying URL query strings with support for nested objects, arrays, and custom formatting. It is designed as a drop-in replacement for Node.js's built-in querystring module but with enhanced security features, including protection against prototype pollution, configurable depth limits, and parameter/array size limits. The library exposes three main functions: `parse`, `stringify`, and `formats`, all accessible from the single entry point `lib/index.js`. Internally, it uses a side-channel pattern for cycle detection and overflow tracking, and implements a chunked UTF-8 encoder to handle surrogate pairs safely. The codebase is well-tested with an extensive suite of edge-case tests, and it is distributed as an npm package with browser builds via Browserify. Architecturally, qs is a focused, single-purpose library with a clean separation of concerns: parsing logic in `lib/parse.js`, serialization in `lib/stringify.js`, shared utilities in `lib/utils.js`, and formatting constants in `lib/formats.js`. It follows a functional style with option normalization functions that validate and fill defaults, making the API robust against misuse. The library has a long history (over a decade) and is widely adopted (nearly 9000 stars), but its maintenance shows signs of high release churn and legacy support burdens, including backporting fixes to older Node.js versions (>=0.6) and maintaining outdated packaging artifacts like `bower.json` and `component.json`. Despite these legacy concerns, the core code is well-crafted, security-conscious, and actively maintained with frequent releases and responsive issue triage.
Twig.js is a JavaScript port of the Twig templating language, originally written in PHP. It provides a full-featured template engine for both Node.js and browser environments, implementing core Twig syntax: variable interpolation ({{ }}), logic tags ({% %}), comments ({# #}), template inheritance via extends/block, includes, embeds, macros, and a rich set of filters, functions, and tests. The library ships as a UMD bundle for browsers and CommonJS for Node, and integrates with Express as a view engine via __express and renderFile. A CLI (bin/twigjs) compiles .twig templates into standalone JavaScript modules for Node, AMD, or CJS2 targets. The architecture is modular: src/twig.core.js handles tokenization, compilation, and template caching; src/twig.expression.js implements an expression tokenizer and shunting-yard parser for operators, filters, and function calls; src/twig.logic.js handles control-flow tags; and src/twig.filters.js / src/twig.functions.js provide the standard filter/function libraries. A factory pattern (src/twig.factory.js) assembles all submodules, and an extension API (extendTag, extendFilter, extendFunction, extendTest) allows users to add custom behavior. The codebase is well-tested with an extensive suite covering control structures, inheritance, expressions, filters, loaders, parsers, and browser-specific behavior. The repository carries legacy baggage: mixed ES5/ES6 style, a custom synchronous Promise implementation (Twig.Promise) that is not fully spec-compliant, and incomplete parity with Twig 3.x features (several filters/functions marked unsupported in implementation notes). The project migrated from Travis CI to GitHub Actions (Node 22/24) and maintains active development, but the custom async layer and dependency on locutus (PHP function ports) are areas of potential fragility. Demos include an Express note-taking app and a Backbone.js Twitter feed, both using older patterns but useful as integration references.
ExifReader is a mature, well-maintained JavaScript library for extracting metadata from image files. It supports a wide range of image formats including JPEG, TIFF, PNG, HEIC, AVIF, WebP, GIF, and JPEG XL. The library parses EXIF, IPTC, XMP, ICC profiles, JFIF, MPF, Photoshop, and camera maker notes (Canon, Pentax). It is designed for both browser and Node.js environments, with a modular architecture that allows custom builds via tree-shaking and feature flags to reduce bundle size. The library exposes a promise-based API (`load()` and `loadView()`) and includes advanced features like adaptive partial file loading (`length: 'auto'`), tag filtering, thumbnail extraction, and comprehensive metadata range reporting. Security is a strong focus: bounds checks, value budgeting, and protection against crafted/malformed files are present throughout the parsers.
Lorem Ipsum.js is a JavaScript library that generates placeholder lorem ipsum text for use in web development, design mockups, and other applications requiring dummy text. It provides both a programmatic API and a command-line interface, supporting output in plain text or HTML formats with configurable parameters for word, sentence, and paragraph counts. The library is designed to work across multiple JavaScript environments including Node.js, web browsers, and React Native. The architecture follows a modular structure with clear separation of concerns: core text generation logic resides in lib/, utility functions in util/, constants in constants/, and the CLI interface in bin/. The main entry point exports a loremIpsum() function that accepts configuration options and delegates to specialized classes for generation and formatting. The system handles platform-specific details like line endings and clipboard operations through environment detection utilities. Key features include robust input validation, cross-platform compatibility, customizable word lists and length bounds, and proper error handling. The library implements defensive programming practices with comprehensive type safety via TypeScript, extensive unit testing, and attention to edge cases such as unsupported platforms or invalid parameters. The CLI tool offers additional functionality like copying generated text to the system clipboard.
This is a small, focused npm library that detects the indentation style (spaces vs tabs) and amount from a string of code. The core algorithm analyzes consecutive non-empty lines, counts indent changes, and uses a heuristic to ignore single-space indents initially to avoid false positives from alignment. It returns the detected type, amount, and the actual indent string. The implementation is clean, well-tested, and has zero runtime dependencies. It is a classic example of a single-purpose utility library with careful edge-case handling (e.g., mixed indentation, vendor-prefixed CSS, comments, CRLF line endings). The code is self-contained and could be easily extracted or reused in other projects.
This is the d3/d3 monorepo — the umbrella package for D3.js v7.9.0, the canonical JavaScript library for bespoke data visualization. The repository's src/index.js is a pure re-export barrel: it aggregates 28 individual D3 modules (d3-array, d3-axis, d3-scale, d3-selection, d3-shape, d3-geo, d3-hierarchy, d3-force, d3-transition, etc.) and re-exports their entire public APIs. There is no application logic, no DOM code, and no data processing in this repo itself — all implementation lives in the individual submodule packages listed under dependencies. The repo's real content is its documentation site (VitePress-based, in docs/), its test suite (mocha tests verifying the barrel exports), and its build configuration (rollup.config.js bundles the modules into UMD and ESM distributions in dist/). The docs/ directory contains comprehensive, interactive API documentation for every submodule, with live Vue components rendering visualizations using D3 and Observable Plot. The test suite is minimal but meaningful: d3-test.js verifies that every named export from each submodule is present on the d3 namespace, and docs-test.js crawls the markdown documentation to verify that all internal links resolve to existing anchors. The CI pipeline runs tests, linting, bundle builds, and doc builds on every push to main.
fullPage.js is a vanilla JavaScript library for creating full-screen scrolling websites (one-page sites) with vertical/horizontal snap scrolling, sections, and slides. The codebase uses a modular ES6 architecture with separate concerns for scroll handling, mouse/touch input, keyboard navigation, state management, and DOM manipulation. It exports a main class from src/js/fullpage.js with initialization via src/js/app.js. The library manages DOM structure through CSS classes (.fp-section, .fp-slide, .active, .fp-loaded) and maintains global state in src/js/common/state.js. It supports optional jQuery integration via src/js/jquery-adaptor.js and includes polyfills for IE11 compatibility. The build system uses Rollup for bundling and Gulp for asset processing, producing distribution files in dist/. The library features lazy loading for media, responsive breakpoints, and extensive callback hooks for lifecycle management.
This repository is a lightweight JavaScript library that provides a feature-rich wrapper around the browser's `localStorage` and `sessionStorage` APIs. It offers a unified API for storing, retrieving, and manipulating JSON data, with support for namespacing, multiple storage areas (local, session, page, custom), and a plugin system for extensions. The core module (`src/store2.js`) implements a Store constructor that creates namespace-aware stores, with methods like `get`, `set`, `remove`, `clear`, `each`, `keys`, `transact`, and `add`. It also includes a fake storage fallback for environments where Web Storage is unavailable. The architecture is modular: the core is augmented by optional extension files (e.g., caching, array operations, event handling, cookie backing) that hook into internal methods via `store._`. The library is production-ready, with extensive unit tests and CI via Travis CI (though using Node.js 9, which is outdated). Key entry points are the `store` function and its namespace/area methods, which expose the entire API.
NippleJS is a vanilla virtual joystick library for touch and mouse interfaces, designed for mobile games, remote controls, and interactive web applications. The core library in `packages/nipplejs/` provides a lightweight, dependency-free joystick with three modes (dynamic, semi, static), multitouch support, and extensive event-driven APIs. The architecture is built around a Factory singleton managing Collections, each of which manages multiple Joystick instances. The library is written in TypeScript, with thorough unit tests and Playwright end-to-end tests covering event accuracy, mode behavior, cleanup, and edge cases. The repository also includes a documentation site built with Astro, featuring five interactive game demos that showcase library features, along with a monorepo structure for tools and tests. While the core library is modern and well-tested, some tooling (ESLint 8, Husky v4) and the workspace Yarn version mismatch indicate minor technical drift.
This is the Postman Collection SDK, a JavaScript library that provides a complete object model for Postman Collections (v2.1 format). It enables developers to create, manipulate, serialize, and deserialize collections, items, requests, responses, variables, and other HTTP-related constructs. The library is used internally by Postman's own tools (e.g., Newman, Postman app) and by third-party integrations. It features a class hierarchy rooted in PropertyBase, with PropertyList for generic indexed lists, variable substitution via SuperString, dynamic variable generation (faker-based), URL matching patterns, content-type detection, and mutation tracking. The codebase is well-tested (100% unit test coverage enforced) and includes both Node.js and browser support. While the core architecture is clean and modular, some dependencies are outdated (lodash 4.18.1, file-type 3.9.0) and there are deprecated API surfaces maintained for backward compatibility. The SDK is actively maintained with frequent releases and CI/CD pipelines.
impress.js is a client-side JavaScript presentation framework that leverages CSS3 3D transforms and transitions to create dynamic, Prezi-like slideshows. The core library manages step navigation, camera positioning, and event handling, exposing a simple API (`impress().init()`, `next()`, `prev()`, `goto()`). It features a plugin system where each plugin is a separate file under `src/plugins/`, communicating via events. Plugins add functionality such as autoplay, markdown rendering, speaker console, touch/swipe navigation, and relative positioning. The build process (`build.js`) concatenates the core and all plugins into a single distributable file (`js/impress.js`) and minifies it with Terser. The repository includes multiple example presentations demonstrating various features, a QUnit test suite, and CI configuration. There are no runtime dependencies; the library is designed to work in modern browsers with CSS 3D support. The codebase is well-structured with clear separation of concerns, though some tooling (jshint, jscs, ESLint 6) and a Node requirement of >=7.6 indicate moderate technical drift.
Clipboard.js is a lightweight JavaScript library that provides a modern, no-Flash way to copy or cut text to the clipboard. It operates as a browser library, using event delegation via the `good-listener` package and the deprecated `document.execCommand` API. The core class `ClipboardJS` can be instantiated with a DOM selector, element, or NodeList, and it automatically listens for click events to trigger copy/cut actions based on HTML data attributes (`data-clipboard-text`, `data-clipboard-target`, `data-clipboard-action`). It also exposes static `copy()` and `cut()` methods for programmatic use, and emits custom `success` and `error` events. The library includes a fallback mechanism using a temporary textarea element for browsers that do not support selecting hidden elements. It is well-tested, has TypeScript definitions, and is distributed as a UMD bundle. The architecture is a simple monolith with a single entry point and isolated action modules.
NSFWJS is a client-side JavaScript library for detecting NSFW (Not Safe For Work) content in images using TensorFlow.js. It provides a simple API to load pre-trained models (MobileNetV2, MobileNetV2Mid, InceptionV3) and classify images into five categories: Drawing, Hentai, Neutral, Porn, and Sexy. The library is designed for both browser and Node.js environments, with backend selection guidance for optimal performance (WebGL, WebGPU, WASM, CPU). The core architecture consists of a lightweight `NSFWJS` class that handles model loading, inference, classification, and disposal, with support for tree-shaking via separate model imports. The repository also includes several demo applications: a full-featured React + Vite demo with Web Worker offloading, camera support, and file drop; a Node.js Express server example; and a minimal HTML/script tag demo. While primarily an application library, it is hybrid in nature as it bundles pre-trained model weights (quantized and base64-encoded) and includes model conversion scripts, making it both a software tool and a model distribution package. The library relies on TensorFlow.js as a peer dependency and uses IndexedDB for model caching in the browser.
This is the Locomotive Scroll library (v5), a lightweight JavaScript library for smooth scrolling, parallax effects, viewport detection, and progress tracking on the web. It is built on top of Lenis and uses dual Intersection Observers for performance. The repository is a monorepo containing the core library package (`packages/lib`), a demo site (Astro), a documentation site (Docusaurus), and a landing page (Eleventy/GSAP). The library exposes a data-attribute-driven API (`data-scroll`, `data-scroll-speed`, etc.) and a `LocomotiveScroll` class with lifecycle methods. The architecture is well-structured with clean separation of concerns: Core orchestration, IO wrapper, per-element scroll tracking, and utility math functions. The library is TypeScript-first and outputs multiple module formats (ESM, CJS, UMD). While the core is solid, there are signs of technical drift (older TypeScript version, some duplicated utilities across packages, and a bundle including full Lenis source). The demo and landing page sites are more complex and tightly coupled to GSAP, but the core library is reusable as an npm package.
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.
Plyr is a widely-used, client-side JavaScript library that provides a simple, accessible, and customizable media player for HTML5 video/audio, YouTube, and Vimeo. It is implemented as a modular class with plugins, utilities, and a comprehensive SCSS theming system. The library handles all aspects of media playback: custom controls, captions (VTT), fullscreen, picture-in-picture, AirPlay, speed and quality selection, preview thumbnails, and ads (Google IMA). It uses a build system based on Gulp and Rollup, produces ES and UMD bundles, and includes a polyfilled variant for older browsers. The codebase is well-organized with clear separation of concerns (controls, captions, fullscreen, listeners, storage, plugins) and extensive JSDoc documentation. However, it exhibits some technical drift, including legacy UA sniffing, a large controls module marked for refactoring, and deprecated build tooling. Despite this, the library remains actively maintained and is production-ready, with a robust demo site and a large user community.
Modernizr is a JavaScript library that detects browser support for HTML5, CSS3, and other web features. In production, it runs on page load, executing a suite of tests and setting CSS classes on the <html> element to indicate feature support or lack thereof. It also provides a CLI tool (bin/modernizr) and a Node.js API (lib/build.js) for generating custom builds containing only the desired feature tests. The architecture is modular, using the AMD (RequireJS) pattern. The core library (src/) provides the test runner, prefix resolution, and class setting logic. Feature tests are organized in the feature-detects/ directory, each following a standardized metadata and test pattern. The build pipeline (Gulp) compiles selected modules into a single minified JavaScript file. The codebase demonstrates high craftsmanship in several isolated components. src/prefixed.js provides a robust vendor prefix resolution algorithm. src/testAllProps.js offers a generic CSS property/value testing utility. src/injectElementWithStyles.js is a clever pattern for dynamic visual testing. These components are self-contained and could be extracted for use in other projects requiring cross-browser compatibility logic. Despite its strong core, the project suffers from significant technical drift. The build system relies on Gulp and AMD, which are legacy technologies. Dependency versions in package.json (e.g., lodash: ^4.18.1, jquery: ^4.0.0) appear to be typos or refer to non-standard forks, posing a significant dependency resolution risk. The project has been in a 4.0.0-alpha state for an extended period. While actively maintained (recent commits, active CI), the accumulation of legacy feature detects and outdated infrastructure makes it a high-drift codebase.