set-immediate-interval
TypeScript icon, indicating that this package has built-in type declarations

2.0.2 • Public • Published

Set Immediate Interval

Create an interval that executes callback function without delay at the first time. Typescript supported.

npm npm npm Build Status Coverage Status

API

setImmediateInterval(callback, ms)

  • callback: function - Required. The function that will be executed
  • ms: 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

Package Sidebar

Install

npm i set-immediate-interval

Weekly Downloads

9

Version

2.0.2

License

MIT

Unpacked Size

5.75 kB

Total Files

12

Last publish

Collaborators

  • liketurbo