Installations
npm install khoros-use-lodash-debounce-throttle
Developer Guide
Typescript
Yes
Module System
CommonJS, UMD
Node Version
10.3.0
NPM Version
6.1.0
Score
64.6
Supply Chain
80.9
Quality
75
Maintenance
100
Vulnerability
99.6
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
TypeScript (87.9%)
JavaScript (12.1%)
Developer
Frezc
Download Statistics
Total Downloads
856
Last Day
1
Last Week
1
Last Month
5
Last Year
55
GitHub Statistics
6 Stars
13 Commits
1 Forks
2 Watching
2 Branches
1 Contributors
Package Meta Information
Latest Version
0.3.5
Package Id
khoros-use-lodash-debounce-throttle@0.3.5
Unpacked Size
22.05 kB
Size
5.33 kB
File Count
31
NPM Version
6.1.0
Node Version
10.3.0
Total Downloads
Cumulative downloads
Total Downloads
856
Last day
0%
1
Compared to previous day
Last week
-66.7%
1
Compared to previous week
Last month
25%
5
Compared to previous month
Last year
-17.9%
55
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Bring debounce & throttle of lodash version to react-hooks.
useDebounce
& useThrottle
will auto create, update and cancel debounced & throttled instance, so you do not need to cancel manually.
demo
https://frezc.github.io/use-lodash-debounce-throttle/
usage
install
1yarn add use-lodash-debounce-throttle
useDebounce
1import { useDebounce } from 'use-lodash-debounce-throttle'; 2 3const Com = () => { 4 const debouncedChange = useDebounce((v) => { 5 postUpdate(); 6 }, 500, { maxWait: 2000 }); 7 8 return ( 9 <input 10 type="text" 11 onChange={(e) => { 12 debouncedChange(e.target.value) 13 }} 14 /> 15 ) 16}
useThrottle
1import { useThrottle } from 'use-lodash-debounce-throttle'; 2 3const Com = () => { 4 const debouncedChange = useThrottle((v) => { 5 sendMessage(); 6 }, 500, { leading: false }); 7 8 return ( 9 <input 10 type="text" 11 onChange={(e) => { 12 debouncedChange(e.target.value) 13 }} 14 /> 15 ) 16}
API
- useDebounce: same as https://lodash.com/docs/4.17.11#debounce
- useThrottle: same as https://lodash.com/docs/4.17.11#throttle
DEV
yarn install
yarn start
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 0/13 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- 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
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
2.6
/10
Last Scanned on 2025-01-13
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