appolo-utils
Advanced tools
Comparing version 0.0.39 to 0.0.40
@@ -21,3 +21,3 @@ "use strict"; | ||
if (now - lastTime >= timeFrame) { | ||
func.apply(null, arguments); | ||
func.apply(this, arguments); | ||
lastTime = now; | ||
@@ -24,0 +24,0 @@ } |
export class Functions { | ||
public static memoize(fn: Function, resolver: (args?: any[]) => string | number) { | ||
public static memoize(fn: Function, resolver?: (args?: any[]) => string | number) { | ||
let cache = {}; | ||
@@ -26,3 +26,3 @@ return (...args) => { | ||
if (now - lastTime >= timeFrame) { | ||
func.apply(null, arguments); | ||
func.apply(this, arguments); | ||
lastTime = now; | ||
@@ -33,3 +33,3 @@ } | ||
public static debounce(func: Function, wait: number, immediate: boolean) { | ||
public static debounce(func: Function, wait: number, immediate?: boolean) { | ||
let timeout; | ||
@@ -36,0 +36,0 @@ return function () { |
@@ -17,3 +17,3 @@ { | ||
"main": "./index.js", | ||
"version": "0.0.39", | ||
"version": "0.0.40", | ||
"license": "MIT", | ||
@@ -20,0 +20,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
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
94153