Comparing version 1.0.1 to 1.0.2
@@ -10,3 +10,3 @@ (function() { | ||
* which can be invoked to disable the alarm. | ||
* @param {Date} at | ||
* @param {Date|string} at | ||
* @param {function} run | ||
@@ -19,2 +19,6 @@ * @returns {function} | ||
if (!(at instanceof Date)) { | ||
at = new Date(at.toString()); | ||
} | ||
if (at.getTime() >= now) { | ||
@@ -21,0 +25,0 @@ timeout = setTimeout(run, at.getTime() - now); |
{ | ||
"name": "alarm", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Simple alarm function to call function at a specified Date", | ||
@@ -5,0 +5,0 @@ "main": "alarm.js", |
2381
40