{"library":"trough","type":"library","category":null,"description":"`trough` is a lightweight, promise-aware middleware utility designed for building flexible processing pipelines in JavaScript and TypeScript environments. Currently at version 2.2.0, it is actively maintained with a consistent release cadence for minor improvements and bug fixes, typically addressing specific use cases or compatibility enhancements. Unlike some traditional middleware solutions, `trough` allows each stage of the pipeline to modify the input for subsequent stages and seamlessly integrates both synchronous and asynchronous functions, including those that return promises or use Node.js-style callbacks. Its core differentiator lies in its minimal API and explicit control over data flow, making it suitable for scenarios like plugin systems or data transformation pipelines. It is an ESM-only package, targeting modern Node.js (v16+) and browser environments via `esm.sh`.","language":"javascript","status":"active","version":"2.2.0","tags":["javascript","middleware","ware","typescript"],"last_verified":"Wed May 27","install":[{"cmd":"npm install trough","imports":["import { trough } from 'trough'","import { wrap } from 'trough'","import type { Pipeline } from 'trough'","import type { Middleware } from 'trough'"]},{"cmd":"yarn add trough","imports":[]},{"cmd":"pnpm add trough","imports":[]}],"homepage":"https://trough.com","github":"https://github.com/wooorm/trough","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/trough","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/trough/compatibility"}}