New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@types/raw-body

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/raw-body - npm Package Compare versions

Comparing version 2.1.2 to 2.1.3

18

raw-body/index.d.ts

@@ -19,7 +19,12 @@ // Type definitions for raw-body 2.1

/**
* The byte limit of the body. This is the number of bytes or any string format supported by `bytes`, for example `1000`, `'500kb'` or `'3mb'`. If the body ends up being larger than this limit, a `413` error code is returned.
* The byte limit of the body.
* This is the number of bytes or any string format supported by `bytes`, for example `1000`, `'500kb'` or `'3mb'`.
* If the body ends up being larger than this limit, a `413` error code is returned.
*/
limit?: number | string | null;
/**
* The encoding to use to decode the body into a string. By default, a `Buffer` instance will be returned when no encoding is specified. Most likely, you want `utf-8`, so setting encoding to `true` will decode as `utf-8`. You can use any type of encoding supported by `iconv-lite`.
* The encoding to use to decode the body into a string.
* By default, a `Buffer` instance will be returned when no encoding is specified.
* Most likely, you want `utf-8`, so setting encoding to `true` will decode as `utf-8`.
* You can use any type of encoding supported by `iconv-lite`.
*/

@@ -60,6 +65,11 @@ encoding?: Encoding | null;

/**
* Gets the entire buffer of a stream either as a `Buffer` or a string. Validates the stream's length against an expected length and maximum limit. Ideal for parsing request bodies.
* Gets the entire buffer of a stream either as a `Buffer` or a string.
* Validates the stream's length against an expected length and maximum limit.
* Ideal for parsing request bodies.
*/
declare function getRawBody(stream: Readable, callback: (err: getRawBody.RawBodyError, body: Buffer) => void): void;
declare function getRawBody(stream: Readable, options: (getRawBody.Options & { encoding: getRawBody.Encoding }) | getRawBody.Encoding, callback: (err: getRawBody.RawBodyError, body: string) => void): void;
declare function getRawBody(
stream: Readable,
options: (getRawBody.Options & { encoding: getRawBody.Encoding }) | getRawBody.Encoding,
callback: (err: getRawBody.RawBodyError, body: string) => void): void;
declare function getRawBody(stream: Readable, options: getRawBody.Options, callback: (err: getRawBody.RawBodyError, body: Buffer) => void): void;

@@ -66,0 +76,0 @@

{
"name": "@types/raw-body",
"version": "2.1.2",
"version": "2.1.3",
"description": "TypeScript definitions for raw-body",
"license": "MIT",
"author": "Stefan Reichel <https://github.com/bomret>",
"contributors": [
{
"name": "Stefan Reichel",
"url": "https://github.com/bomret"
}
],
"main": "",

@@ -17,4 +22,4 @@ "repository": {

"peerDependencies": {},
"typesPublisherContentHash": "0371de1695352073d1c9798af875d70e551cc329edabfc5614d3703a84e6e6d9",
"typesPublisherContentHash": "40aba308bffc74fb44ce50112e9faea92b95031e4099d76c3be6914e3cde6704",
"typeScriptVersion": "2.0"
}

@@ -11,3 +11,3 @@ # Installation

Additional Details
* Last updated: Tue, 07 Feb 2017 20:01:00 GMT
* Last updated: Thu, 23 Feb 2017 15:22:21 GMT
* Dependencies: stream, node

@@ -14,0 +14,0 @@ * Global values: none

@@ -6,3 +6,8 @@ {

"data": {
"authors": "Stefan Reichel <https://github.com/bomret>",
"contributors": [
{
"name": "Stefan Reichel",
"url": "https://github.com/bomret"
}
],
"dependencies": {

@@ -28,5 +33,5 @@ "stream": "*",

"hasPackageJson": false,
"contentHash": "0371de1695352073d1c9798af875d70e551cc329edabfc5614d3703a84e6e6d9"
"contentHash": "40aba308bffc74fb44ce50112e9faea92b95031e4099d76c3be6914e3cde6704"
},
"isLatest": true
}
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