@algolia/autocomplete-shared
Advanced tools
Comparing version 1.0.0-alpha.37 to 1.0.0-alpha.38
@@ -1,1 +0,1 @@ | ||
export declare function debounce<TParams>(fn: (params: TParams) => void, time: number): (args: TParams) => void; | ||
export declare function debounce<TParams>(fn: (...params: TParams[]) => void, time: number): (...args: TParams[]) => void; |
export function debounce(fn, time) { | ||
var timerId = undefined; | ||
return function (args) { | ||
return function () { | ||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { | ||
args[_key] = arguments[_key]; | ||
} | ||
if (timerId) { | ||
@@ -9,5 +13,5 @@ clearTimeout(timerId); | ||
timerId = setTimeout(function () { | ||
return fn(args); | ||
return fn.apply(void 0, args); | ||
}, time); | ||
}; | ||
} |
export * from './createRef'; | ||
export * from './debounce'; | ||
export * from './invariant'; | ||
export * from './isEqual'; | ||
@@ -4,0 +5,0 @@ export * from './MaybePromise'; |
export * from './createRef'; | ||
export * from './debounce'; | ||
export * from './invariant'; | ||
export * from './isEqual'; | ||
@@ -4,0 +5,0 @@ export * from './MaybePromise'; |
{ | ||
"name": "@algolia/autocomplete-shared", | ||
"description": "Shared utils for Autocomplete packages.", | ||
"version": "1.0.0-alpha.37", | ||
"version": "1.0.0-alpha.38", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "homepage": "https://github.com/algolia/autocomplete.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4407
15
105