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

@felte/common

Package Overview
Dependencies
Maintainers
1
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@felte/common - npm Package Compare versions

Comparing version

to
1.1.1

9

dist/esm/utils/debounce.js

@@ -1,7 +0,12 @@

function debounce(func, timeout) {
function debounce(func, timeout, { onInit, onEnd } = {}) {
let timer;
return (...args) => {
clearTimeout(timer);
if (!timer)
onInit === null || onInit === void 0 ? void 0 : onInit();
if (timer)
clearTimeout(timer);
timer = setTimeout(() => {
func.apply(this, args);
timer = undefined;
onEnd === null || onEnd === void 0 ? void 0 : onEnd();
}, timeout);

@@ -8,0 +13,0 @@ };

@@ -345,3 +345,6 @@ import { Readable, Writable } from "svelte/store";

declare function isEqual(val1: unknown, val2: unknown): boolean;
declare function debounce<T extends unknown[]>(this: any, func: (...v: T) => any, timeout?: number): (...args: T) => void;
declare function debounce<T extends unknown[]>(this: any, func: (...v: T) => any, timeout?: number, { onInit, onEnd }?: {
onInit?: () => void;
onEnd?: () => void;
}): (...args: T) => void;
/**

@@ -348,0 +351,0 @@ * @category Helper

@@ -1,2 +0,5 @@

declare function debounce<T extends unknown[]>(this: any, func: (...v: T) => any, timeout?: number): (...args: T) => void;
declare function debounce<T extends unknown[]>(this: any, func: (...v: T) => any, timeout?: number, { onInit, onEnd }?: {
onInit?: () => void;
onEnd?: () => void;
}): (...args: T) => void;
export { debounce };
{
"name": "@felte/common",
"version": "1.1.0",
"version": "1.1.1",
"description": "Common utilities for Felte packages",

@@ -5,0 +5,0 @@ "author": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet