🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

setinterval

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

setinterval - npm Package Compare versions

Comparing version

to
0.2.4

5

History.md
0.2.4 / 2021-07-26
==================
* feat: optimize code (#4)
0.2.3 / 2021-07-25

@@ -3,0 +8,0 @@ ==================

26

index.js

@@ -50,17 +50,6 @@ 'use strict';

const setupTimer = invokeImmediate => {
this._continue = true;
// invoke immediately
if (invokeImmediate) {
this._runTask();
} else {
this._timer = setTimeout(() => this._runTask(), this._period);
}
};
if (!isNaN(initialDelay) && initialDelay > 0) {
setTimeout(() => setupTimer(invokeImmediate), initialDelay);
setTimeout(() => this._setupTimer(invokeImmediate), initialDelay);
} else {
setupTimer(invokeImmediate);
this._setupTimer(invokeImmediate);
}

@@ -82,2 +71,13 @@

}
_setupTimer(invokeImmediate) {
this._continue = true;
// invoke immediately
if (invokeImmediate) {
this._runTask();
} else {
this._timer = setTimeout(() => this._runTask(), this._period);
}
}
}

@@ -84,0 +84,0 @@

{
"name": "setinterval",
"version": "0.2.3",
"version": "0.2.4",
"keywords": [

@@ -5,0 +5,0 @@ "setInterval",