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

headers-polyfill

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

headers-polyfill - npm Package Compare versions

Comparing version 4.0.0 to 4.0.1

4

package.json
{
"name": "headers-polyfill",
"version": "4.0.0",
"version": "4.0.1",
"description": "A native \"Headers\" class polyfill.",

@@ -43,2 +43,2 @@ "main": "./lib/index.js",

}
}
}

@@ -15,4 +15,2 @@ [![Published version](https://img.shields.io/npm/v/headers-polyfill.svg)](https://www.npmjs.com/package/headers-polyfill)

npm install headers-polyfill
# or
yarn add headers-polyfill
```

@@ -53,10 +51,8 @@

### Custom methods
## Transformations
In addition, the polyfill instance has the following methods:
### `getRawHeaders()`
- `.all()`
Returns an object consisting of the header name/value pairs but preserving raw header names.
Returns the object of the _normalized_ header name/value pairs.
```js

@@ -68,16 +64,2 @@ const headers = new Headers({

headers.all()
// { "accept": "*/*", "content-type": "application/json" }
```
- `.raw()`
Similar to the `.all()` method, `.raw()` returns an object consisting of the header name/value pairs, but preserving raw header names.
```js
const headers = new Headers({
Accept: '*/*',
'Content-Type': 'application/json',
})
headers.raw()

@@ -87,4 +69,2 @@ // { "Accept": "*/*", "Content-Type": "application/json" }

## Transformations
### Headers ⭢ N

@@ -91,0 +71,0 @@

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