set-immediate-interval
v2.0.2
Published
Create an interval that executes callback function without delay at the first time. _Typescript supported._
Downloads
60
Maintainers
Readme
Set Immediate Interval
Create an interval that executes callback function without delay at the first time. Typescript supported.
API
setImmediateInterval(callback, ms)
callback
:function
- Required. The function that will be executedms
:number
- Required. The intervals (in milliseconds) on how often to execute the code
Example
import setImmediateInterval from 'set-immediate-interval';
const interval = setImmediateInterval(() => console.log('Hello, World!'), 1000);
setTimeout(() => clearInterval(interval), 5000);
License
MIT