use-debouncy
Advanced tools
Comparing version 1.8.0 to 1.9.0
@@ -0,1 +1,8 @@ | ||
# [1.9.0](https://github.com/eavam/use-debouncy/compare/v1.8.0...v1.9.0) (2020-06-24) | ||
### Features | ||
* optimize bundle size ([1d393cb](https://github.com/eavam/use-debouncy/commit/1d393cbb384fd18dcce3f13fe9e8717335443fc1)) | ||
# [1.8.0](https://github.com/eavam/use-debouncy/compare/v1.7.0...v1.8.0) (2020-06-24) | ||
@@ -2,0 +9,0 @@ |
import { EffectCallback, DependencyList } from 'react'; | ||
declare const useDebouncy: (fn: EffectCallback, wait?: number, deps?: DependencyList) => void; | ||
declare const useDebouncy: (fn: EffectCallback, wait?: number | undefined, deps?: DependencyList | undefined) => void; | ||
export default useDebouncy; |
@@ -1,2 +0,2 @@ | ||
import{useRef as n,useEffect as o}from"react";var t=o,i=function(n){n&&clearTimeout(n)};export default function(o,u,c){void 0===u&&(u=0),void 0===c&&(c=[]);var f=n([void 0,o]);t((function(){f.current[1]=o}),[o]),t((function(){i(f.current[0]),f.current[0]=setTimeout((function(){f.current[1]()}),u)}),c),t((function(){return i(f.current[0]),function(){i(f.current[0])}}),[])} | ||
import{useRef as n,useEffect as t}from"react";var o=t,i=function(n){n&&clearTimeout(n)};export default function(t,u,c){var f=u||0,r=c||[],e=n([void 0,t]);o((function(){e.current[1]=t}),[t]),o((function(){i(e.current[0]),e.current[0]=setTimeout((function(){e.current[1]()}),f)}),r),o((function(){return i(e.current[0]),function(){i(e.current[0])}}),[])} | ||
//# sourceMappingURL=index.es.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";var n=require("react"),i=n.useEffect,t=function(n){n&&clearTimeout(n)};module.exports=function(o,u,c){void 0===u&&(u=0),void 0===c&&(c=[]);var e=n.useRef([void 0,o]);i((function(){e.current[1]=o}),[o]),i((function(){t(e.current[0]),e.current[0]=setTimeout((function(){e.current[1]()}),u)}),c),i((function(){return t(e.current[0]),function(){t(e.current[0])}}),[])}; | ||
"use strict";var n=require("react"),t=n.useEffect,u=function(n){n&&clearTimeout(n)};module.exports=function(i,o,c){var e=o||0,r=c||[],f=n.useRef([void 0,i]);t((function(){f.current[1]=i}),[i]),t((function(){u(f.current[0]),f.current[0]=setTimeout((function(){f.current[1]()}),e)}),r),t((function(){return u(f.current[0]),function(){u(f.current[0])}}),[])}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "use-debouncy", | ||
"version": "1.8.0", | ||
"version": "1.9.0", | ||
"author": "Egor Avakumov", | ||
"description": "React effect hook for debounce", | ||
"description": "Small (<150 bytes ⚡️) debounce react effect hook with typescript 🌀", | ||
"license": "MIT", | ||
"keywords": [ | ||
"debounce", | ||
"typescript", | ||
"hooks", | ||
@@ -13,3 +14,4 @@ "use-debounce", | ||
"react-hook", | ||
"use-debouncy" | ||
"use-debouncy", | ||
"use-effect" | ||
], | ||
@@ -49,3 +51,3 @@ "repository": { | ||
"@testing-library/react-hooks": "3.3.0", | ||
"@types/jest": "26.0.0", | ||
"@types/jest": "26.0.1", | ||
"@types/react": "16.9.38", | ||
@@ -52,0 +54,0 @@ "@typescript-eslint/eslint-plugin": "3.4.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
13814