A lightweight middleware library for Node.js (v1.0.88, actively maintained). It provides a simple and flexible way to compose asynchronous middleware chains, similar to Koa or Express but with a minimal API surface. Key differentiators: zero dependencies, TypeScript-first design with built-in types, and a focus on performance. It is intended for use in HTTP server frameworks or custom middleware pipelines. Current version 1.0.88 is stable; new releases appear monthly.
npm install jubi-middlewareNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates composing and running a middleware chain with logger, auth, and handler.
Always await next() in middleware unless you intend to terminate the chain.
Be careful about modifying ctx; use it to pass data (e.g., ctx.user) but avoid unintended side effects.
Update to v1.0.0+ and await the result of compose() if you relied on synchronous behavior.
Ensure each middleware has (ctx, next) => ... and calls await next() if needed.
Provide a context with 'req' and 'res' properties as expected by the middleware.
Run 'npm install jubi-middleware' and use correct import: import { compose } from 'jubi-middleware'.Ensure next() is called exactly once (or not at all if terminating the chain).
No dependency data recorded yet.