{"id":48985215,"url":"https://github.com/backrunner/response-wrap","last_synced_at":"2026-04-18T12:10:56.398Z","repository":{"id":119018085,"uuid":"461482934","full_name":"backrunner/response-wrap","owner":"backrunner","description":"Simple response wrapper classes for Node.js servers","archived":false,"fork":false,"pushed_at":"2023-11-27T17:36:16.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-19T09:40:46.340Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/backrunner.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-20T12:37:10.000Z","updated_at":"2022-02-20T12:38:43.000Z","dependencies_parsed_at":"2024-10-30T13:14:09.130Z","dependency_job_id":null,"html_url":"https://github.com/backrunner/response-wrap","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"c21d0312393d8bd199d687a14b3d601b44e6f618"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/backrunner/response-wrap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backrunner%2Fresponse-wrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backrunner%2Fresponse-wrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backrunner%2Fresponse-wrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backrunner%2Fresponse-wrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/backrunner","download_url":"https://codeload.github.com/backrunner/response-wrap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backrunner%2Fresponse-wrap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31968139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"online","status_checked_at":"2026-04-18T02:00:07.018Z","response_time":103,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2026-04-18T12:10:55.808Z","updated_at":"2026-04-18T12:10:56.392Z","avatar_url":"https://github.com/backrunner.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# response-wrap\n\nSimple response wrapper classes for Node.js servers.\n\nThis package was created by [create-a-typescript-lib](https://github.com/backrunner/create-a-typescript-lib).\n\n## Usage\n\nStep 1: Install this package\n\n```bash\nnpm install response-wrap -S\n```\n\nStep 2: Import and use it\n\n```ts\nimport Koa from 'koa';\nimport KoaRouter from '@koa/router';\nimport { Response, SuccessResponse, ErrorResponse } from 'response-wrap';\n\ninterface ResponsePayload {\n  token: string;\n}\n\nconst app = new Koa();\nconst router = new Router();\n\nrouter.get('/res', (ctx, next) =\u003e {\n  ctx.body = new Response\u003cResponsePayload\u003e(\n    {\n      token: 'abc123',\n    },\n    0,\n    'success',\n  );\n});\n\nrouter.get('/error', (ctx, next) =\u003e {\n  ctx.body = new ErrorResponse(-1, 'internal server error');\n});\n\nrouter.get('/successRes', (ctx, next) =\u003e {\n  ctx.body = new SuccessResponse\u003cResponsePayload\u003e({\n    token: 'abc123',\n  });\n});\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackrunner%2Fresponse-wrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbackrunner%2Fresponse-wrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackrunner%2Fresponse-wrap/lists"}