Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@koa/bodyparser

Package Overview
Dependencies
Maintainers
9
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@koa/bodyparser - npm Package Compare versions

Comparing version 5.0.0 to 5.1.0

2

dist/body-parser.js

@@ -133,3 +133,3 @@ var __create = Object.create;

}
return async function(ctx, next) {
return async function bodyParser(ctx, next) {
if (

@@ -136,0 +136,0 @@ // method souldn't be parsed

@@ -136,3 +136,3 @@ var __create = Object.create;

}
return async function(ctx, next) {
return async function bodyParser(ctx, next) {
if (

@@ -139,0 +139,0 @@ // method souldn't be parsed

{
"name": "@koa/bodyparser",
"version": "5.0.0",
"version": "5.1.0",
"description": "Koa body parsing middleware",

@@ -5,0 +5,0 @@ "main": "./dist/index.js",

@@ -9,3 +9,3 @@ # [**@koa/bodyparser**](https://github.com/koajs/bodyparser)

[npm-image]: https://img.shields.io/npm/v/@koa/bodyparser.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/@koa/router
[npm-url]: https://www.npmjs.com/package/@koa/bodyparser
[github-action-image]: https://github.com/koajs/bodyparser/actions/workflows/ci.yml/badge.svg?style=flat-square

@@ -28,3 +28,3 @@ [coveralls-image]: https://img.shields.io/coveralls/koajs/bodyparser.svg?style=flat-square

```bash
$ npm i @koa/bodyparser
$ npm i @koa/bodyparser --save
```

@@ -36,3 +36,3 @@

const Koa = require("koa");
const bodyParser = require("@koa/bodyparser");
const { bodyParser } = require("@koa/bodyparser");

@@ -122,9 +122,23 @@ const app = new Koa();

```bash
npm install koa-bodyparser@2 --save
$ npm install koa-bodyparser@2 --save
```
#### Licences
usage
---
```js
const Koa = require("koa");
const bodyParser = require("@koa/bodyparser");
const app = new Koa();
app.use(bodyParser());
app.use((ctx) => {
// the parsed body will store in ctx.request.body
// if nothing was parsed, body will be an empty object {}
ctx.body = ctx.request.body;
});
```
## Licences
[MIT](LICENSE)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc