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

koa-body-parser

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

koa-body-parser - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

3

index.js

@@ -75,3 +75,4 @@ var getRawBody = require('raw-body')

return yield getRawBody(stream, {
limit: lim || limit
limit: lim || limit,
expected: !decoder && this.length
})

@@ -78,0 +79,0 @@ }

{
"name": "koa-body-parser",
"description": "Request body parser for koa",
"version": "0.1.0",
"version": "0.1.1",
"author": {

@@ -21,3 +21,3 @@ "name": "Jonathan Ong",

"dependencies": {
"raw-body": "~0.1.1"
"raw-body": "~0.2.0"
},

@@ -24,0 +24,0 @@ "peerDependencies": {

@@ -37,3 +37,3 @@ # Koa Body Parser [![Build Status](https://travis-ci.org/koajs/body-parser.png)](https://travis-ci.org/koajs/body-parser)

var body = (yield* this.request.json())
|| (yield* this.request.form())
|| (yield* this.request.urlencoded())
// do stuff with your body

@@ -68,3 +68,3 @@ })

var body = yield* bodyParser()
var body = yield* bodyParser.call(this)
})

@@ -92,3 +92,3 @@ ```

- `querystring` [require('querystring')] - the querystring parser. Node's by default. If you want to use `qs`, set it as `require('qs')`.
- `maxKeys` [1000] - maximum number of keys. Passed to [querystring.parse](http://nodejs.org/api/querystring.html#querystring_querystring_parse_str_sep_eq_options)
- `maxKeys` [1000] - maximum number of keys. Passed to [querystring.parse](http://nodejs.org/api/querystring.html#querystring_querystring_parse_str_sep_eq_options).

@@ -99,3 +99,3 @@ ### yield* this.request.json([limit])

The function call is required.
`limit` is the optional limit in bytes integer for the body that overrides the default.
An optional `limit` overrides the default limit.

@@ -106,3 +106,3 @@ ### yield* this.request.urlencoded([limit])

The function call is required.
`limit` is the optional limit in bytes integer for the body that overrides the default.
An optional `limit` overrides the default limit.

@@ -113,9 +113,9 @@ ### yield* this.request.string([limit])

The function call is required.
`limit` is the optional limit in bytes integer for the body that overrides the default.
An optional `limit` overrides the default limit.
### yields* this.request.buffer([limit])
### yield* this.request.buffer([limit])
Buffers the response and returns a raw `Buffer` instance.
The function call is required.
`limit` is the optional limit in bytes integer for the body that overrides the default.
An optional `limit` overrides the default limit.

@@ -122,0 +122,0 @@ ## License

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