koa-body-parser
Advanced tools
+2
-1
@@ -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 @@ } |
+2
-2
| { | ||
| "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": { |
+8
-8
@@ -37,3 +37,3 @@ # Koa Body Parser [](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 |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
65
1.56%0
-100%6886
-1.43%+ Added
- Removed
Updated