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

expire

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

expire - npm Package Compare versions

Comparing version 0.4.3 to 0.4.4

6

lib/expire.js

@@ -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 @@

2

package.json
{
"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 @@

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