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

parsehttpdate

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

parsehttpdate - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

2

changelog.md

@@ -13,4 +13,4 @@ ### 1.0.0

### 1.0.3 - 1.0.7
### 1.0.3 - 1.0.8
(No changes)
{
"name": "parsehttpdate",
"description": "Parses the value of the Date header in HTTP responses",
"version": "1.0.7",
"version": "1.0.8",
"main": "compiled/cjs/parsehttpdate.min.js",

@@ -18,8 +18,8 @@ "module": "compiled/esm/parsehttpdate.min.js",

"devDependencies": {
"@babel/preset-env": "^7.12.11",
"@rollup/plugin-babel": "^5.2.3",
"@babel/preset-env": "^7.14.4",
"@rollup/plugin-babel": "^5.3.0",
"babel-preset-minify": "^0.5.1",
"jest": "^26.6.3",
"rollup": "^2.38.1",
"typescript": "^4.1.3"
"jest": "^27.0.3",
"rollup": "^2.50.5",
"typescript": "^4.3.2"
},

@@ -26,0 +26,0 @@ "scripts": {

@@ -20,3 +20,3 @@ Ontleedt de waarde van de `Date` header in HTTP antwoorden.

```html
<script src="https://unpkg.com/parsehttpdate@^1.0.7"></script>
<script src="https://unpkg.com/parsehttpdate@^1.0.8"></script>
```

@@ -39,9 +39,3 @@ Met deze aanpak wordt de functie beschikbaar als `window.parseHttpDate`.

fetch('/')
.then(({ headers }) => {
if (headers.has('Date')) {
return headers.get('Date');
} else /* if (false == headers.has('Date')) */ {
throw new Error('The response lacks a Date header');
}
})
.then(({ headers }) => headers.get('Date'))
.then(parseHttpDate)

@@ -60,7 +54,3 @@ .then(date => {

const { headers } = await fetch('/');
if (headers.has('Date')) {
return parseHttpDate(headers.get('Date'));
} else /* if (false == headers.has('Date')) */ {
throw new Error('The response lacks a Date header');
}
return parseHttpDate(headers.get('Date'));
}

@@ -67,0 +57,0 @@

@@ -20,3 +20,3 @@ Parses the value of the `Date` header in HTTP responses.

```html
<script src="https://unpkg.com/parsehttpdate@^1.0.7"></script>
<script src="https://unpkg.com/parsehttpdate@^1.0.8"></script>
```

@@ -37,9 +37,3 @@ This alternative makes the function available at `window.parseHttpDate`.

fetch('/')
.then(({ headers }) => {
if (headers.has('Date')) {
return headers.get('Date');
} else /* if (false == headers.has('Date')) */ {
throw new Error('The response lacks a Date header');
}
})
.then(({ headers }) => headers.get('Date'))
.then(parseHttpDate)

@@ -56,7 +50,3 @@ .then(date => {

const { headers } = await fetch('/');
if (headers.has('Date')) {
return parseHttpDate(headers.get('Date'));
} else /* if (false == headers.has('Date')) */ {
throw new Error('The response lacks a Date header');
}
return parseHttpDate(headers.get('Date'));
}

@@ -63,0 +53,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