New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

expired

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expired - npm Package Compare versions

Comparing version 1.3.6 to 1.3.7

2

package.json
{
"name": "expired",
"version": "1.3.6",
"version": "1.3.7",
"description": "Calculate when HTTP responses expire from the cache headers",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -7,6 +7,6 @@ const isBefore = require('date-fns/is_before');

// Returns boolean for whether or not the cache has expired
const expired = (headers, date = new Date()) => isBefore(expired.on(headers), date);
const expired = (headers, date) => isBefore(expired.on(headers), (date || new Date()));
// Return ms until cache expires
expired.in = (headers, date = new Date()) => differenceInMilliseconds(expired.on(headers), date);
expired.in = (headers, date) => differenceInMilliseconds(expired.on(headers), (date || new Date()));

@@ -13,0 +13,0 @@ // Returns date when cache will expire

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