expiration_date
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -79,8 +79,3 @@ | ||
var args = Array.prototype.slice.call(arguments) | ||
res = args.filter(function(i) { return typeof i === 'object' })[0] | ||
time = args.filter(function(i) { return typeof i === 'string' })[0] | ||
var seconds = getSeconds(time) | ||
var seconds = typeof time === 'number' ? time : getSeconds(time) | ||
var date = new Date() | ||
@@ -87,0 +82,0 @@ date.setHours(date.getHours() + (seconds/3600)) |
{ | ||
"name": "expiration_date", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "Convenient utility for client-side expiration", | ||
@@ -5,0 +5,0 @@ "keywords": ["expiration", "expire"], |
@@ -34,4 +34,4 @@ ## Expiration Date | ||
`setExpiration` will simply attach `Expires` and `Cache-Control` to the response object for you. Pass the response object or time string in any order. | ||
`setExpiration` will simply attach `Expires` and `Cache-Control` to the response object for you. First argument is an object, second is either a number (of seconds) or a string. | ||
This module is used internally by [Lactate](https://github.com/Weltschmerz/Lactate) |
2877
70