{"id":16373190,"url":"https://github.com/bbqsrc/koa-simple-body","last_synced_at":"2026-03-20T11:30:15.934Z","repository":{"id":66192645,"uuid":"77591633","full_name":"bbqsrc/koa-simple-body","owner":"bbqsrc","description":"A clean body parser for Koa v2","archived":false,"fork":false,"pushed_at":"2017-03-07T06:50:37.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-31T21:12:00.523Z","etag":null,"topics":["body-parser","koa"],"latest_commit_sha":null,"homepage":null,"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/bbqsrc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2016-12-29T07:13:20.000Z","updated_at":"2019-06-10T14:27:18.000Z","dependencies_parsed_at":"2023-02-25T07:00:11.391Z","dependency_job_id":null,"html_url":"https://github.com/bbqsrc/koa-simple-body","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbqsrc%2Fkoa-simple-body","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbqsrc%2Fkoa-simple-body/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbqsrc%2Fkoa-simple-body/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bbqsrc%2Fkoa-simple-body/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bbqsrc","download_url":"https://codeload.github.com/bbqsrc/koa-simple-body/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239933303,"owners_count":19720758,"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":["body-parser","koa"],"created_at":"2024-10-11T03:13:37.065Z","updated_at":"2026-03-20T11:30:15.704Z","avatar_url":"https://github.com/bbqsrc.png","language":"JavaScript","readme":"# koa-simple-body\n\n```\nnpm install koa-simple-body\n```\n\nCoherent and consistent body parsing implementation for Koa v2.\n\nSupports multipart, url-encoded and JSON data by default. Check the `index.js` for the specific MIME types.\n\nEverything it doesn't understand is parsed as plain text.\n\n## Usage\n\n### Defaults\n\n```javascript\nconst Koa = require(\"koa\")\nconst bodyParser = require(\"bodyParser\")\n\nconst app = new Koa()\n\napp.use(bodyParser())\n\napp.use(ctx =\u003e {\n  // Print fields\n  console.log(ctx.request.fields)\n\n  // Print files (formidable)\n  console.log(ctx.request.files)\n})\n```\n\nThat's it!\n\n### Extra options\n\n```javascript\nbodyParser({\n  useBuffer: true,      // enables parsing text/* as a buffer\n  buffer: \"50kb\",       // max buffer size\n  text: \"50kb\",         // max text size\n  json: \"100kb\",        // max json size\n  urlEncoded: \"500kb\",  // max url-encoded size\n  multipart: {\n    // Formidable options object (some examples shown)\n    maxFieldsSize: 5 * 1024 * 1024, // 5mb\n\n    // Allow array of files with 'multiple' attribute\n    multiples: true\n  }    \n})\n```\n\nFor more information on the `Formidable.IncomingForm` options available, see the\n[felixge/node-formidable](https://github.com/felixge/node-formidable) repository.\n\n## Roadmap\n\n### 2.0\n\n- Add support for bubbling errors to middleware (feedback and suggestions for API encouraged)\n- Ensure default size settings are coherent and best defaults\n\n## License\n\nMIT - see LICENSE file.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbqsrc%2Fkoa-simple-body","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbqsrc%2Fkoa-simple-body","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbqsrc%2Fkoa-simple-body/lists"}