Installations
npm install re-use-debounce
Developer Guide
Typescript
Yes
Module System
CommonJS, UMD
Score
64.6
Supply Chain
93.5
Quality
74.8
Maintenance
100
Vulnerability
99.6
License
Contributors
Unable to fetch Contributors
Languages
TypeScript (89.97%)
JavaScript (10.03%)
Developer
sseppola
Download Statistics
Total Downloads
3,858
Last Day
1
Last Week
1
Last Month
6
Last Year
64
GitHub Statistics
10 Commits
1 Watching
1 Branches
1 Contributors
Bundle Size
540.00 B
Minified
318.00 B
Minified + Gzipped
Package Meta Information
Latest Version
0.0.1
Package Id
re-use-debounce@0.0.1
Unpacked Size
155.05 kB
Size
60.95 kB
File Count
10
Total Downloads
Cumulative downloads
Total Downloads
3,858
Last day
0%
1
Compared to previous day
Last week
-50%
1
Compared to previous week
Last month
100%
6
Compared to previous month
Last year
-4.5%
64
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
re-use-debounce
Reuse lodash debounce as React hook
Install
$ npm install re-use-debounce
Note: This libaray expects that you already depend on lodash 4.
Usage
1import React from 'react'; 2import useDebounce from 're-use-debounce'; 3 4function MyComponent(props) { 5 const [value, setValue] = React.useState(''); 6 7 const [debouncedValue, setDebouncedValue] = React.useState(''); 8 useDebounce(value, setDebouncedValue, 300); 9 10 React.useEffect(() => { 11 console.log(`debouncedValue: ${debouncedValue}`); 12 }, [debouncedValue]) 13 14 return ( 15 <input value={value} onChange={event => setValue(event.target.value)} /> 16 ); 17}
API
useDebounce(input, onChange, delay, [options])
input
Type: any
The value that is being debounced
onChange
Type: function
The function to debounce
delay
Type: number
The number of milliseconds to debounce
options
Type: Object
leading
Type: boolean
Default: false
Specify invoking on the leading edge of the timeout.
trailing
Type: boolean
Default: true
Specify invoking on the trailing edge of the timeout.
maxWait
Type: number
Default: undefined
The maximum time onChange
is allowed to be delayed before it's invoked.
License
MIT © Sindre Seppola
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: license:0
- Info: FSF or OSI recognized license: MIT License: license:0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
Found 0/10 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
46 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-6chw-6frg-f759
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-q42p-pg8m-cqh6
- Warn: Project is vulnerable to: GHSA-w457-6q6x-cgp9
- Warn: Project is vulnerable to: GHSA-62gr-4qp9-h98f
- Warn: Project is vulnerable to: GHSA-f52g-6jhx-586p
- Warn: Project is vulnerable to: GHSA-2cf5-4w76-r9qv
- Warn: Project is vulnerable to: GHSA-3cqr-58rm-57f8
- Warn: Project is vulnerable to: GHSA-g9r4-xpmj-mj65
- Warn: Project is vulnerable to: GHSA-q2c6-c6pm-g3gh
- Warn: Project is vulnerable to: GHSA-765h-qjxv-5f44
- Warn: Project is vulnerable to: GHSA-f2jv-r9rf-7988
- Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj
- Warn: Project is vulnerable to: GHSA-8j8c-7jfh-h6hx
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-6c8f-qphg-qjgp
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m / GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-fhjf-83wg-r2j9
- Warn: Project is vulnerable to: GHSA-5fw9-fq32-wv5p
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-4g88-fppr-53pp
- Warn: Project is vulnerable to: GHSA-4jqc-8m5r-9rpr
- Warn: Project is vulnerable to: GHSA-jgrx-mgxx-jf9v
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-6fc8-4gx4-v693
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh
- Warn: Project is vulnerable to: GHSA-p9pc-299p-vxgp
Score
1.7
/10
Last Scanned on 2025-01-06
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More