Socket
Socket
Sign inDemoInstall

koa-json-body

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-json-body - npm Package Compare versions

Comparing version 5.0.0 to 5.1.0

6

package.json
{
"name": "koa-json-body",
"version": "5.0.0",
"version": "5.1.0",
"description": "koa middleware to parse json request bodies",

@@ -33,3 +33,3 @@ "main": "lib/index.js",

"devDependencies": {
"koa": ">= 2.0.0",
"koa": "next",
"mocha": "^2.3.3",

@@ -39,4 +39,4 @@ "supertest": "^1.1.0"

"peerDependencies": {
"koa": ">= 2.0.0"
"koa": "next"
}
}

@@ -12,7 +12,2 @@ koa-json-body

NOTE
----
This branch is for koa v2, which uses Promises instead of Generator functions. For koa 0.x and 1.x support, see the [koa-1](https://github.com/venables/koa-json-body/tree/koa-1) branch.
Installation

@@ -42,4 +37,4 @@ ------------

app.use(function *() {
console.log(this.request.body);
app.use(function(ctx, next) {
console.log(ctx.request.body);
});

@@ -53,7 +48,13 @@ ```

app.post('/users', jsonBody, function *() {
console.log(this.request.body);
app.post('/users', jsonBody, function(ctx, next) {
console.log(ctx.request.body);
});
```
Made for koa 2
--------------
For koa 0.x and 1.x support, see the [koa-1](https://github.com/venables/koa-json-body/tree/koa-1) branch.
Versioning

@@ -60,0 +61,0 @@ ----------

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