Comparing version 1.2.0 to 1.2.1
{ | ||
"name": "expired", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Calculate when HTTP responses expire from the cache headers", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -31,9 +31,9 @@ # expired | ||
expired(headers) | ||
expired(headers); | ||
// false | ||
expired.in(headers) | ||
expired.in(headers); | ||
// 500000 | ||
expired.on(headers) | ||
expired.on(headers); | ||
// Date('2016-12-23T05:55:31.000Z') | ||
@@ -43,9 +43,9 @@ | ||
expired(headers) | ||
expired(headers); | ||
// true | ||
expired.in(headers) | ||
expired.in(headers); | ||
// -100000 | ||
expired.on(headers) | ||
expired.on(headers); | ||
// Date('2016-12-23T05:55:31.000Z') | ||
@@ -56,3 +56,3 @@ | ||
Response headers are parsed into an object by many HTTP modules. `expired` will also accept a parsed header object: | ||
Many HTTP modules will parse response headers into an object for you. `expired` will also accept headers in this format: | ||
@@ -74,3 +74,3 @@ ```js | ||
expired(headers) | ||
expired(headers); | ||
// false | ||
@@ -89,5 +89,5 @@ ``` | ||
expired(headers, date) | ||
expired.in(headers, date) | ||
expired.on(headers) | ||
expired(headers, date); | ||
expired.in(headers, date); | ||
expired.on(headers); | ||
``` | ||
@@ -94,0 +94,0 @@ |
@@ -22,3 +22,3 @@ import test from 'ava'; | ||
const headers = { | ||
date: subSeconds(new Date().toUTCString(), 500), | ||
date: subSeconds(new Date(), 500).toUTCString(), | ||
age: 0, | ||
@@ -25,0 +25,0 @@ 'cache-control': 'public, max-age=300' |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12433