setinterval-bykey

1.0.2 • Public • Published

Installation

  • You need to install the package on your project
npm i setinterval-bykey

How To Use

const setInt = require('setinterval-bykey');

setInt.start(fn, interval, key); // To Start Interval By Key | fn = Function
// Example
setInt.start(functionStart, 20 * 1000, `Interval_For_Test`);

setInt.isRun(key); // To Get If Interval is Available or No | Key Of Interval
// Exmaple
setInt.isRun(`Interval_For_Test`); // Return True

setInt.clear(key); // To Clear Interval | Key Of Interval
// Example
setInt.clear(`Interval_For_Test`); // Return True

setInt.clearAll(); // To Clear All Interval

Package Sidebar

Install

npm i setinterval-bykey

Weekly Downloads

26

Version

1.0.2

License

ISC

Unpacked Size

21.7 kB

Total Files

4

Last publish

Collaborators

  • slash2