Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

set-interval-immediately

shuaibird2ISC1.0.1

To execute callback function of setInterval immediately

setInterval

readme

set-interval-immediately

To execute callback function of setInterval immediately.

Installation

npm install set-interval-immediately --save

Usage

The same usage as setInterval and works in both browsers & node.js.

const setIntervalImmediately = require('set-interval-immediately');

setIntervalImmediately(
  () => console.log(`I'd be executed immediately`),
  1000,
);