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

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 4.0.0 to 5.0.0-alpha.1

lib/index.js

17

package.json
{
"name": "koa-json-body",
"version": "4.0.0",
"version": "5.0.0-alpha.1",
"description": "koa middleware to parse json request bodies",
"main": "index.js",
"main": "lib/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "mocha test"
},

@@ -26,5 +26,16 @@ "repository": {

"homepage": "https://github.com/venables/koa-json-body",
"engines": {
"node": ">= 4.0.0"
},
"dependencies": {
"co-body": "^4.0.0"
},
"devDependencies": {
"koa": ">= 2.0.0-alpha.3",
"mocha": "^2.3.3",
"supertest": "^1.1.0"
},
"peerDependencies": {
"koa": ">= 2.0.0-alpha.3"
}
}

13

README.md
koa-json-body
=============
[![Dependency Status](https://david-dm.org/venables/koa-json-body.png)](https://david-dm.org/venables/koa-json-body)
[![Version](https://img.shields.io/npm/v/koa-json-body.svg?style=flat-square)](https://www.npmjs.com/package/koa-json-body)
[![Dependency Status](https://img.shields.io/david/venables/koa-json-body/master.svg?style=flat-square)](https://david-dm.org/venables/koa-json-body)
[![Downloads](https://img.shields.io/npm/dm/koa-json-body.svg?style=flat-square)](https://www.npmjs.com/package/koa-json-body)
Very simple [koa](https://github.com/koajs/koa) middleware wrapper around [co-body](https://github.com/visionmedia/co-body) for parsing JSON request bodies. Largely inspired by [koa-body](https://github.com/dlau/koa-body).
Simple [koa](https://github.com/koajs/koa) middleware wrapper around [co-body](https://github.com/visionmedia/co-body) for parsing JSON request bodies.
This will not parse anythig but valid JSON request bodies. If there is a JSON error, the middleware will set `ctx.request.body` to `{}` and continue.
This will not parse anythig but valid JSON request bodies. If there is a JSON parsing error, the middleware will set `ctx.request.body` to `{}` and continue.
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

@@ -11,0 +18,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