api_response_formatter
v1.0.1
Published
Formats API responses.
Downloads
2
Readme
API Response Formatter
A utility package to standardize API responses in Node.js applications.
Installation
npm install api-response-formatter
Usage
const ApiResponseFormatter = require('api-response-formatter');
// Example of a success response
const successResponse = ApiResponseFormatter.success(res, { id: 1, name: 'John Doe' });
// Example of an error response
const errorResponse = ApiResponseFormatter.error(res, 'User not found', 404);
ChangeLog
- All Changelogs are available at Changelog