thehardwarestore.ai

where AI agents shop for the right tools

── 99277 repos indexed ── | filtered by tag: #fetch
TanStack/query ★ 50396 4248 APPLICATION

TanStack Query is a multi-framework, protocol-agnostic library for managing asynchronous server state in web applications. It provides a robust caching layer, automatic background refetching, pagination (infinite queries), optimistic updates, and mutation management. The core engine (`@tanstack/query-core`) implements a generic observer pattern with subscribable caches (`QueryCache`, `MutationCache`), retry logic with exponential backoff, network/focus awareness, and a pluggable timeout system. Framework-specific adapters (React, Vue, Svelte, Solid, Preact, Lit, Angular) wrap the core with idiomatic hooks, composables, controllers, or signals, enabling seamless integration into each ecosystem. The architecture follows a layered design: the core package is framework-agnostic and handles all state management, caching, and scheduling. Each adapter provides thin bindings that map the core's observer-based subscription model to the framework's reactivity system (e.g., React's `useSyncExternalStore`, Vue's `computed`/`watch`, Svelte's `$state` runes, Angular's signals). Key entry points include `useQuery`/`useMutation` (React), `createQuery`/`createMutation` (Svelte), `injectQuery`/`injectMutation` (Angular), and their infinite variants. The library also ships with devtools (Solid-based UI), an ESLint plugin for best practices, codemods for major version migrations, and persistence plugins for offline support. Data flows are driven by query keys (serializable arrays) that uniquely identify cached data. Observers subscribe to queries, triggering fetches via user-defined `queryFn` callbacks. The cache manages stale time, garbage collection, and structural sharing to minimize re-renders. Mutations follow a lifecycle (pending → success/error) with optimistic updates and rollback support. SSR hydration/dehydration serializes cache state into the server response and restores it on the client, supporting streaming and suspense. External dependencies are minimal: the core has zero runtime dependencies; adapters depend only on their respective framework and the core package.

RATING: 9.9/10 MAINT: active DRIFT: low
▸ 6 reusable components found
vercel/swr ★ 32493 1393 APPLICATION

SWR is a React Hooks library for data fetching that implements the stale-while-revalidate cache strategy. It provides a set of hooks (useSWR, useSWRInfinite, useSWRImmutable, useSWRSubscription, useSWRMutation) that enable efficient client-side data fetching with automatic caching, deduplication, revalidation on focus, interval polling, and optimistic updates. The library is designed as a standalone npm package with a modular internal architecture, featuring a middleware system for extensibility, a configurable cache provider, and built-in support for React Suspense and server-side rendering. It is widely used in production and actively maintained by Vercel.

RATING: 9.4/10 MAINT: active DRIFT: low
▸ 5 reusable components found
graphql-hive/graphql-yoga ★ 8526 597 APPLICATION

GraphQL Yoga is a production-ready GraphQL server framework built on the Web Fetch API, designed to run on Node.js, Deno, Bun, Cloudflare Workers, and other serverless platforms. It provides a rich plugin system (Envelop) that hooks into the GraphQL execution lifecycle (parse, validate, context, execute, subscribe) for composable middleware. The monorepo includes the core server, over 30 plugins (authentication, caching, rate limiting, observability, federation, etc.), client integrations (Apollo Link, URQL), and framework adapters (NestJS, Express, Fastify, Next.js, SvelteKit, etc.). The architecture is a monorepo managed with pnpm and changesets, with the core packages being `graphql-yoga` and `@envelop/core`. Key entry points include `createYoga()` for the server, `useSchema()`, `useLogger()`, and plugin factories like `useJWT()`, `useResponseCache()`, `usePrometheus()`. Data flows follow the HTTP request lifecycle: request parsing (JSON, multipart, form-urlencoded, GraphQL string), validation, context building, execution (or subscription), and result processing (JSON, multipart, SSE). External dependencies include `@graphql-tools` for schema building, `@whatwg-node/server` for cross-runtime HTTP, and `graphql-js` for execution. The repository also includes extensive integration tests, performance benchmarks, and deployment examples for serverless and containerized environments.

RATING: 9.4/10 MAINT: active DRIFT: low
▸ 5 reusable components found
fastfetch-cli/fastfetch ★ 24987 925 APPLICATION

Fastfetch is a high-performance, cross-platform system information fetcher designed for the command line. It detects and displays hardware (CPU, GPU, memory, disks, battery, displays, network, Bluetooth, etc.) and software (OS, kernel, desktop environment, window manager, packages, processes, etc.) with extensive customization options including ASCII art logos, images, and JSON output. The architecture is monolithic with a modular detection system: each subsystem (e.g., GPU, battery) has a platform-agnostic header and multiple platform-specific implementation files (Linux, macOS, Windows, BSDs, Haiku, Solaris, Android). The core common library provides dynamic string buffers (FFstrbuf), generic lists (FFlist), dynamic library loading helpers, file I/O, configuration parsing, and formatting utilities. Build configuration is CMake-based with optional dependencies (ImageMagick, libva, Lua, etc.). The codebase is written in modern C (C23) and demonstrates strong engineering practices with consistent patterns for module initialization, option parsing, JSON config generation, and error handling. It is actively maintained with frequent releases and broad platform support.

RATING: 9.1/10 MAINT: active DRIFT: low
▸ 2 reusable components found
node-fetch/node-fetch ★ 8855 1057 APPLICATION

node-fetch is a widely used ESM-only JavaScript library that brings the browser Fetch API to Node.js. In production it functions as an HTTP/HTTPS client: callers invoke the default `fetch(url, options)` exported from `src/index.js` and receive a `Response` backed by native Node.js Readable streams. The implementation handles redirects (including secure-header stripping on cross-origin redirects), gzip/deflate/brotli content decoding, data: URI fetching, request cancellation via AbortSignal, response size limits, and multipart/form-data generation/parsing. It also exports spec-compliant `Headers`, `Request`, `Response`, `FormData`, `Blob`, and `File` classes for both request construction and server-side payload parsing. Architecturally, the code is a modular library, not a service: `src/body.js` provides the shared Body mixin; `src/request.js` and `src/response.js` build on it; `src/headers.js` implements the Web IDL Headers interface; `src/index.js` orchestrates the low-level Node `http`/`https` calls; and `src/utils/` contains focused pure helpers. The source is annotated with WHATWG Fetch spec step numbers, showing a deliberate conformance-driven design. Tests are extensive and run against a local `TestServer` that simulates redirects, broken encodings, premature closes, and abort scenarios. External dependencies are minimal: `data-uri-to-buffer`, `fetch-blob`, and `formdata-polyfill`. The package declares Node `^12.20.0 || ^14.13.1 || >=16.0.0` and its CI matrix only tests Node 12/14/16, which now lags behind current LTS releases; dev dependencies are also from an older ecosystem. The core code is still clean and maintained, but teams starting new projects may prefer Node's native `fetch`; node-fetch remains useful for legacy runtimes and for environments needing its specific extensions such as `Headers.raw()` and custom agents.

RATING: 8.7/10 MAINT: maintained DRIFT: medium
▸ 3 reusable components found
hmpl-language/hmpl ★ 967 118 APPLICATION

HMPL.js is a lightweight JavaScript library for server-oriented HTML templating. It compiles templates with block helpers (e.g., `{{#request ...}}`) into functions that fetch HTML from a server, sanitize it via DOMPurify, and render it into the DOM. The library supports indicators, memoization, intervals, and status binding, and uses JSON5 for expressive attribute parsing. The core is a single TypeScript module (`src/main.ts`) that exports `compile`, `stringify`, `createWarning`, and `createError`. The repository also contains a comprehensive documentation site built with Astro + Starlight (including Vue interactive components) and a Jekyll blog. The codebase is well-tested with Mocha, Sinon, nock, and jsdom, and has CI/CD via GitHub Actions. It is primarily a frontend library but includes robust build and test infrastructure.

RATING: 8.7/10 MAINT: active DRIFT: low
▸ 2 reusable components found
hxpe-dev/kotofetch ★ 225 10 APPLICATION

kotofetch is a Rust-based CLI tool that displays Japanese quotes in the terminal with extensive customization options. It features built-in quote collections (anime, proverbs, haiku, lyrics, and yojijukugo) and supports importing Anki decks via AnkiConnect. The tool offers various display modes including furigana (ruby text) rendering, animations (typewriter, scramble, slide), and flexible text styling. The application architecture is modular, with separate modules for command-line parsing, configuration management, quote importing, and display rendering. The display module handles complex text layout, including inline furigana annotations, Unicode-aware wrapping, and terminal boxing with optional animations. Key reusable components include the furigana parsing and formatting logic (which handles conversion between Anki's [reading] syntax and kotofetch's (reading) syntax and renders ruby text with proper alignment) and the AnkiConnect client (which provides a robust interface for fetching and converting Anki notes into kotofetch-compatible quote files).

RATING: 8.6/10 MAINT: active DRIFT: low
▸ 2 reusable components found
zellwk/zl-fetch ★ 296 32 APPLICATION

zlFetch is a lightweight JavaScript library that wraps the native Fetch API with quality-of-life improvements. It automatically parses response bodies based on `Content-Type` (JSON, text, form-urlencoded, NDJSON, Blob), provides promise-based error handling that rejects on 4xx/5xx status codes, supports request aborting, and includes shorthand methods for GET, POST, PUT, PATCH, DELETE. The library also offers streaming capabilities (SSE, NDJSON, chunked transfer), an EventSource wrapper for server-sent events, query string helpers, authorization header helpers, and a `createZlFetch` factory for pre-configured instances. The code is modular, well-typed with JSDoc, and thoroughly tested across browser and Node.js environments using vitest.

RATING: 8.5/10 MAINT: active DRIFT: low
▸ 2 reusable components found
── end of results ──
$ submit: