{"id":18788605,"url":"https://github.com/firmanjs/express-message","last_synced_at":"2026-04-20T03:02:15.906Z","repository":{"id":46811882,"uuid":"343963809","full_name":"firmanJS/express-message","owner":"firmanJS","description":"express js global message for custom response json or error handlin and not found response","archived":false,"fork":false,"pushed_at":"2021-09-24T04:12:26.000Z","size":63,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-13T18:42:13.659Z","etag":null,"topics":["expressjs","library","npm","npm-package","package"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/firmanJS.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-03T01:28:22.000Z","updated_at":"2021-09-24T04:10:21.000Z","dependencies_parsed_at":"2022-09-06T17:21:43.118Z","dependency_job_id":null,"html_url":"https://github.com/firmanJS/express-message","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firmanJS%2Fexpress-message","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firmanJS%2Fexpress-message/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firmanJS%2Fexpress-message/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/firmanJS%2Fexpress-message/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/firmanJS","download_url":"https://codeload.github.com/firmanJS/express-message/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239708991,"owners_count":19684165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["expressjs","library","npm","npm-package","package"],"created_at":"2024-11-07T21:05:23.321Z","updated_at":"2025-12-24T23:30:12.813Z","avatar_url":"https://github.com/firmanJS.png","language":"JavaScript","readme":"# EXPRESS MESSAGE\n[![Maintainability](https://api.codeclimate.com/v1/badges/fa7ff692fc39eb14c1d4/maintainability)](https://codeclimate.com/github/firmanJS/express-message/maintainability) \n[![Test Coverage](https://api.codeclimate.com/v1/badges/fa7ff692fc39eb14c1d4/test_coverage)](https://codeclimate.com/github/firmanJS/express-message/test_coverage)\n[![Publish package nodejs](https://github.com/firmanJS/express-message/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/firmanJS/express-message/actions/workflows/npm-publish.yml)\n## Introduction\n\nexpress message is a library that was created to make it easier to write repetitive json responses, to avoid smiliar block of code for your api\n\n## Installation\n\n```sh\n$ npm install express-message\n```\n### using as middleware\n```js\nconst { notFoundHandler, errorHandler } = require('express-message')\n\n// using as middleware for not found response\napp.use(notFoundHandler)\n\n// using as middleware for error handler response\napp.use(errorHandler)\n```\n### using for pagination result\n```js\nconst { getResponse, successResponse, customResponse } = require('express-message')\n/**\n *\n *\n * @param {*} request\n * @param {*} response\n * @param {*} data\n */\ngetResponse(request, response, data)\n\n/**\n *\n *\n * @param {*} response\n * @param {*} message\n * @param {*} data\n */\nsuccessResponse(response, message, data)\n\n/**\n *\n *\n * @param {*} response\n * @param {integer} code\n * @param {*} message\n * @param {array} data\n */\ncustomResponse(response, code, message, data)\n```\n\n(The MIT License)\n\nCopyright (c) 2019-2020 Firman Abdul Hakim\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirmanjs%2Fexpress-message","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirmanjs%2Fexpress-message","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirmanjs%2Fexpress-message/lists"}