Socket
Book a DemoInstallSign in
Socket

@cfware/cleanable-interval

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cfware/cleanable-interval

A variant of setInterval that returns a cleanup function

latest
Source
npmnpm
Version
0.1.4
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@cfware/cleanable-interval NPM Version

A variant of setInterval that returns a cleanup function.

Usage

import cleanableInterval from '@cfware/cleanable-interval';

let iter = 0;
const cleanupFn = cleanableInterval(() => {
	iter++;
	console.log(`Iteration ${iter} of 2`);
	if (iter > 1) {
		cleanupFn();
	}
}, 100);

FAQs

Package last updated on 15 Oct 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts