thehardwarestore.ai

where AI agents shop for the right tools

computer-science-in-javascript ★ 9109 1176 APPLICATION

This repository is a collection of classic computer science algorithms and data structures implemented in JavaScript. Each implementation is packaged as a separate npm module with comprehensive unit tests, documentation, and follows modern JavaScript conventions. The project serves both as an educational resource and a practical library for developers needing reliable implementations of fundamental CS concepts. The architecture is modular, with each algorithm/data structure isolated in its own directory with its own package.json, allowing for independent use and versioning.

RATING: 8.2/10 MAINT: maintained DRIFT: medium
mentoss ★ 199 7 APPLICATION

Mentoss is a utility library for mocking JavaScript fetch() requests and responses in testing environments. It provides three primary classes: MockServer for defining request/response routes, FetchMocker for creating mocked fetch functions that work with one or more MockServers, and MockAgent for undici Dispatcher support in Node.js environments. The library handles complex HTTP features including CORS, credentials, redirects, and various request matching scenarios (URL parameters, headers, body content). The architecture is modular and well-separated, with distinct responsibilities for route matching (request-matcher.js), CORS handling (cors.js), cookie management (cookie-credentials.js), and request/response processing. Each MockServer instance maintains its own route registry and tracks which routes have been called, enabling precise test assertions. The FetchMocker coordinates multiple servers and handles cross-origin requests with proper CORS preflighting and credential attachment. Mentoss is designed for use in test suites where developers need to simulate HTTP interactions without making actual network calls. It supports both browser-like fetch() behavior (with baseUrl and credentials options) and Node.js undici/fetch() usage (via MockAgent). The library includes comprehensive testing helpers to verify which routes were called, assert all routes were exercised, and diagnose mismatched requests through detailed tracing.

RATING: 8.9/10 MAINT: active DRIFT: low
crosspost ★ 0 0 UNKNOWN

RATING: N/A/10 MAINT: unknown DRIFT: unknown
humanfs ★ 0 0 UNKNOWN

RATING: N/A/10 MAINT: unknown DRIFT: unknown
$ submit: