Skip to content

Commit

Permalink
Refactor main function into arrow function
Browse files Browse the repository at this point in the history
  • Loading branch information
lukechilds committed Dec 22, 2016
1 parent 2cf989d commit 3dbcbbf
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/index.js
@@ -1,10 +1,7 @@
const isPast = require('date-fns/is_past');
const addSeconds = require('date-fns/add_seconds');

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

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

0 comments on commit 3dbcbbf

Please sign in to comment.