use-debouncy
Advanced tools
Comparing version 5.0.0 to 5.0.1-0
@@ -0,1 +1,15 @@ | ||
## [5.0.1-beta.2](https://github.com/eavam/use-debouncy/compare/v5.0.1-beta.1...v5.0.1-beta.2) (2023-09-23) | ||
### Bug Fixes | ||
* type generation ([57f2f4c](https://github.com/eavam/use-debouncy/commit/57f2f4cc9bf7c3e69bb6a9eb9716a4bb0011695e)) | ||
## [5.0.1-beta.1](https://github.com/eavam/use-debouncy/compare/v5.0.0...v5.0.1-beta.1) (2023-09-23) | ||
### Bug Fixes | ||
* remove type any ([14a9d23](https://github.com/eavam/use-debouncy/commit/14a9d23ea0c20be54693858a8df6dd2b2f025857)) | ||
# [5.0.0](https://github.com/eavam/use-debouncy/compare/v4.5.0...v5.0.0) (2023-09-19) | ||
@@ -2,0 +16,0 @@ |
@@ -1,2 +0,2 @@ | ||
import{useRef as n,useCallback as e,useEffect as r}from"react";const t=(t,a=0)=>{const o=n(0),c=e(((...n)=>{cancelAnimationFrame(o.current);const e=performance.now(),r=c=>{c-e<a?o.current=requestAnimationFrame(r):t(...n)};o.current=requestAnimationFrame(r)}),[t,a]);return r((()=>()=>cancelAnimationFrame(o.current)),[]),c},a=[],o=(e,o=0,c=a)=>{const m=n(!0),i=t(e,o);r((()=>{m.current?m.current=!1:i()}),c)};export{o as useDebouncyEffect,t as useDebouncyFn}; | ||
import{useRef as n,useCallback as e,useEffect as r}from"react";const t=(t,a=0)=>{const o=n(0),m=e(((...n)=>{cancelAnimationFrame(o.current);const e=performance.now(),r=m=>{m-e<a?o.current=requestAnimationFrame(r):t(...n)};o.current=requestAnimationFrame(r)}),[t,a]);return r((()=>()=>cancelAnimationFrame(o.current)),[]),m},a=[],o=(e,o=0,m=a)=>{const c=n(!0),i=t(e,o);r((()=>{c.current?c.current=!1:i()}),m)},m=t;export{o as useDebouncyEffect,m as useDebouncyFn}; | ||
//# sourceMappingURL=index.es.js.map |
@@ -1,2 +0,2 @@ | ||
"use strict";var e=require("react");const r=(r,n=0)=>{const t=e.useRef(0),a=e.useCallback(((...e)=>{cancelAnimationFrame(t.current);const a=performance.now(),c=o=>{o-a<n?t.current=requestAnimationFrame(c):r(...e)};t.current=requestAnimationFrame(c)}),[r,n]);return e.useEffect((()=>()=>cancelAnimationFrame(t.current)),[]),a},n=[];exports.useDebouncyEffect=(t,a=0,c=n)=>{const o=e.useRef(!0),i=r(t,a);e.useEffect((()=>{o.current?o.current=!1:i()}),c)},exports.useDebouncyFn=r; | ||
"use strict";var e=require("react");const r=(r,n=0)=>{const t=e.useRef(0),a=e.useCallback(((...e)=>{cancelAnimationFrame(t.current);const a=performance.now(),c=o=>{o-a<n?t.current=requestAnimationFrame(c):r(...e)};t.current=requestAnimationFrame(c)}),[r,n]);return e.useEffect((()=>()=>cancelAnimationFrame(t.current)),[]),a},n=[],t=r;exports.useDebouncyEffect=(t,a=0,c=n)=>{const o=e.useRef(!0),i=r(t,a);e.useEffect((()=>{o.current?o.current=!1:i()}),c)},exports.useDebouncyFn=t; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "use-debouncy", | ||
"version": "5.0.0", | ||
"version": "5.0.1-0", | ||
"author": "Egor Avakumov", | ||
@@ -28,3 +28,3 @@ "description": "🌀 Small (~0.2kb) debounce effect hook for React with TypeScript support", | ||
"lint": "eslint . --ext .js,.ts", | ||
"build": "rollup -c --bundleConfigAsCjs", | ||
"build": "yarn prebuild && rollup -c --bundleConfigAsCjs", | ||
"clear": "rimraf lib", | ||
@@ -94,5 +94,18 @@ "prebuild": "yarn clear && tsc -p tsconfig.declaration.json", | ||
"packageManager": "yarn@3.6.3", | ||
"commitlint": { | ||
"extends": [ | ||
"@commitlint/config-conventional" | ||
] | ||
}, | ||
"prettier": { | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
}, | ||
"release": { | ||
"branches": [ | ||
"main" | ||
"main", | ||
{ | ||
"name": "beta", | ||
"prerelease": true | ||
} | ||
], | ||
@@ -127,3 +140,4 @@ "plugins": [ | ||
] | ||
} | ||
}, | ||
"stableVersion": "5.0.0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
46678
13
56
0
3