{"library":"co-compose","type":"library","category":null,"description":"Co-compose is a lightweight, framework-agnostic middleware composition library for JavaScript and TypeScript applications, inspired by patterns found in Koa and AdonisJS. It enables developers to define an array of asynchronous functions (middleware) and execute them sequentially, with explicit control flow via a `next()` function. The current stable version is 7.0.3, which primarily includes dependency updates and minor fixes. Major versions, like v7, tend to update Node.js compatibility requirements, with minor and patch releases focusing on performance improvements and dependency hygiene. Key differentiators include its reported high performance (benchmarked against alternatives like `fastseries` and `middie`), flexibility with custom executors for different middleware shapes (e.g., ES6 classes), and a dedicated final handler mechanism. It ships with full TypeScript types, making it suitable for modern typed environments.","language":"javascript","status":"active","version":"7.0.3","tags":["javascript","adonisjs","koa","middleware","co","co-middleware","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install co-compose","imports":["import { Middleware } from 'co-compose'","import type { MiddlewareHandler } from 'co-compose'","import type { ExecutorFn } from 'co-compose'"]},{"cmd":"yarn add co-compose","imports":[]},{"cmd":"pnpm add co-compose","imports":[]}],"homepage":null,"github":"https://github.com/poppinss/co-compose","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/co-compose","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/co-compose/compatibility"}}