Comparing version 0.4.3 to 0.4.4
@@ -87,8 +87,4 @@ | ||
var seconds = typeof time === 'number' ? time : getSeconds(time) | ||
var date = new Date() | ||
date.setHours(date.getHours() + (seconds/3600)) | ||
res['Cache-Control'] = 'public, max-age='+seconds | ||
res['Expires'] = date.toUTCString() | ||
res['Cache-Control'] = 'max-age='+seconds | ||
return res | ||
@@ -95,0 +91,0 @@ |
{ | ||
"name": "expire", | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"description": "Convenient utility for client-side expiration", | ||
@@ -5,0 +5,0 @@ "keywords": ["expiration", "expire"], |
@@ -602,9 +602,5 @@ | ||
}, | ||
'has valid expires property':function(val) { | ||
assert.ok(val['Expires']) | ||
assert.ok(Date.parse(val['Expires'])) | ||
}, | ||
'has valid Cache-Control property':function(val) { | ||
assert.ok(val['Cache-Control']) | ||
assert.ok(/^max-age=[0-9]+$/.test(val['Cache-Control'])) | ||
assert.ok(/^public, max-age=1$/.test(val['Cache-Control'])) | ||
} | ||
@@ -614,9 +610,5 @@ }, | ||
topic:expire.setExpiration({}, 'one second'), | ||
'has valid expires property':function(val) { | ||
assert.ok(val['Expires']) | ||
assert.ok(Date.parse(val['Expires'])) | ||
}, | ||
'has valid Cache-Control property':function(val) { | ||
assert.ok(val['Cache-Control']) | ||
assert.ok(/^max-age=[0-9]+$/.test(val['Cache-Control'])) | ||
assert.ok(/^public, max-age=1$/.test(val['Cache-Control'])) | ||
} | ||
@@ -626,9 +618,5 @@ }, | ||
topic:expire.setExpiration('one second'), | ||
'has valid expires property':function(val) { | ||
assert.ok(val['Expires']) | ||
assert.ok(Date.parse(val['Expires'])) | ||
}, | ||
'has valid Cache-Control property':function(val) { | ||
assert.ok(val['Cache-Control']) | ||
assert.ok(/^max-age=[0-9]+$/.test(val['Cache-Control'])) | ||
assert.ok(/^public, max-age=1$/.test(val['Cache-Control'])) | ||
} | ||
@@ -635,0 +623,0 @@ |
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
23028
718