Utilities and middleware for creating, validating, and handling jsend JSON response objects in Node.js applications. Version 1.1.0 is the latest stable release. Provides functions to construct success/fail/error responses, validate them (including strict mode), convert from Node-style callbacks, and Express middleware to attach res.jsend helpers. Key differentiator: fully implements the jsend spec with built-in validation and middleware, unlike ad-hoc implementations.
npm install jsendNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates basic usage: creating success/fail/error responses, validating, and using the Express middleware.
Use the same instance consistently or re-create strict version.
Manually check error and call res.jsend.error() instead.
Use jsend.fromArguments or manually parse the response.
None needed.
Use 'import jsend from "jsend"' or 'const jsend = require("jsend")'Ensure app.use(jsend.middleware) is called before defining routes.
Disable strict mode or remove extra properties from the response.
No dependency data recorded yet.