🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@restart/hooks

Package Overview
Dependencies
Maintainers
2
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@restart/hooks - npm Package Compare versions

Comparing version

to
0.2.13

8

es/useInterval.d.ts

@@ -8,2 +8,10 @@ /**

declare function useInterval(fn: () => void, ms: number): void;
/**
* Creates a pasuable `setInterval` that is properly cleaned up when a component unmounted
*
* @param fn an function run on each interval
* @param ms The milliseconds duration of the interval
* @param paused Whether or not the interval is currently running
*/
declare function useInterval(fn: () => void, ms: number, paused: boolean): void;
export default useInterval;

7

es/useInterval.js

@@ -12,9 +12,2 @@ "use strict";

/**
* Creates a pasuable `setInterval` that is properly cleaned up when a component unmounted
*
* @param fn an function run on each interval
* @param ms The milliseconds duration of the interval
* @param paused Whether or not the interval is currently running
*/
function useInterval(fn, ms, paused) {

@@ -21,0 +14,0 @@ if (paused === void 0) {

2

package.json
{
"name": "@restart/hooks",
"version": "0.2.12",
"version": "0.2.13",
"main": "index.js",

@@ -5,0 +5,0 @@ "types": "index.d.ts",

@@ -8,2 +8,10 @@ /**

declare function useInterval(fn: () => void, ms: number): void;
/**
* Creates a pasuable `setInterval` that is properly cleaned up when a component unmounted
*
* @param fn an function run on each interval
* @param ms The milliseconds duration of the interval
* @param paused Whether or not the interval is currently running
*/
declare function useInterval(fn: () => void, ms: number, paused: boolean): void;
export default useInterval;

@@ -12,9 +12,2 @@ "use strict";

/**
* Creates a pasuable `setInterval` that is properly cleaned up when a component unmounted
*
* @param fn an function run on each interval
* @param ms The milliseconds duration of the interval
* @param paused Whether or not the interval is currently running
*/
function useInterval(fn, ms, paused) {

@@ -21,0 +14,0 @@ if (paused === void 0) {