+1
-1
| { | ||
| "name": "read-body", | ||
| "version": "0.2.0", | ||
| "version": "0.2.1", | ||
| "repository": "aleclarson/read-body", | ||
@@ -5,0 +5,0 @@ "devDependencies": { |
+12
-1
@@ -7,3 +7,3 @@ | ||
| ```js | ||
| const readBody = require('read-body') | ||
| import {readBody} from 'read-body' | ||
@@ -39,1 +39,12 @@ // Read the stream into a buffer (limit of 1mb). | ||
| are added to the stream once the promise is resolved. | ||
| ### readJson(input, ?config) | ||
| Shortcut for `readBody(stream, {json: true})`. | ||
| ```js | ||
| import {readJson} from 'read-body' | ||
| // Read the stream into a JSON value (limit of 1mb). | ||
| const json = await readJson(stream) | ||
| ``` |
5290
4.15%49
28.95%