Comparing version 1.0.85 to 1.0.86
{ | ||
"name": "yow", | ||
"version": "1.0.85", | ||
"version": "1.0.86", | ||
"description": "You Only Wish module", | ||
@@ -5,0 +5,0 @@ "main": "yow.js", |
18
timer.js
@@ -7,3 +7,3 @@ | ||
_this.cancel = function() { | ||
function cancel() { | ||
if (_timer != undefined) | ||
@@ -13,15 +13,19 @@ clearTimeout(_timer); | ||
_timer = undefined; | ||
}; | ||
} | ||
_this.setTimer = function(delay, fn) { | ||
function setTimer(delay, fn) { | ||
if (delay == undefined) | ||
delay = 3000; | ||
if (_timer != undefined) | ||
clearTimeout(_timer); | ||
cancel(); | ||
_timer = setTimeout(fn, delay); | ||
_timer = setTimeout(function() { | ||
cancel(); | ||
fn(); | ||
}, delay); | ||
} | ||
}; | ||
_this.cancel = cancel(); | ||
_this.setTimer = setTimer(); | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21238
514