Skip to content

Commit

Permalink
Main function returns boolean for cache validity
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechilds committed Dec 22, 2016
1 parent 9a85592 commit 2cf989d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
const isPast = require('date-fns/is_past');
const addSeconds = require('date-fns/add_seconds');

function expired() {}
function expired(headers) {
const expireDate = expired.on(headers)
return isPast(expireDate);
}

expired.on = headers => {
const originDate = new Date(headers.date);
Expand Down

0 comments on commit 2cf989d

Please sign in to comment.