periodically
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -6,4 +6,4 @@ /** | ||
*/ | ||
module.exports = (func, frequencyInMs) => { | ||
let running = false | ||
module.exports = function periodically(func, frequencyInMs) { | ||
var running = false | ||
@@ -15,3 +15,3 @@ /** | ||
function tick() { | ||
return Promise.resolve(func()).then(() => { | ||
return Promise.resolve(func()).then(function() { | ||
if (running) { | ||
@@ -45,3 +45,3 @@ setTimeout(tick, frequencyInMs) | ||
return { start, stop } | ||
return { start: start, stop: stop } | ||
} |
{ | ||
"name": "periodically", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "A wrapper for doing things periodically", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
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
1801