express-response-formatter

JSON →
library 2.0.2 ·javascript
verified Jun 4, 2026

Express middleware that enhances the response object with a `formatter` property providing readable methods like `ok()`, `created()`, `badRequest()`, etc. Responses are automatically structured: success (2xx/3xx) returns `{ data: ... }`, client/server errors (4xx/5xx) return `{ error: ... }`, and an optional second parameter adds a `meta` field. Version 2.0.2 (latest) ships with TypeScript declarations. It follows a simple, opinionated format and is intended for projects wanting consistent JSON API responses without heavy frameworks. Release cadence is intermittent; maintained as of 2023.