🚀. Socket Launch Week Day 3:Socket Firewall Now Blocks Malicious VS Code and Open VSX Extensions.Learn more
Sign In

read-body

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

read-body - npm Package Compare versions

Comparing version
0.2.0
to
0.2.1
+1
-1
package.json
{
"name": "read-body",
"version": "0.2.0",
"version": "0.2.1",
"repository": "aleclarson/read-body",

@@ -5,0 +5,0 @@ "devDependencies": {

@@ -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)
```