Installations
npm install tiny-throttle
Developer Guide
Typescript
Yes
Module System
CommonJS
Score
66.9
Supply Chain
86.9
Quality
75.4
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
biw
Download Statistics
Total Downloads
39,221
Last Day
2
Last Week
10
Last Month
83
Last Year
4,698
GitHub Statistics
6 Stars
20 Commits
1 Forks
1 Watching
4 Branches
1 Contributors
Bundle Size
769.00 B
Minified
326.00 B
Minified + Gzipped
Package Meta Information
Latest Version
1.0.4
Package Id
tiny-throttle@1.0.4
Unpacked Size
12.91 kB
Size
4.30 kB
File Count
12
Publised On
10 Jan 2023
Total Downloads
Cumulative downloads
Total Downloads
39,221
Last day
-87.5%
2
Compared to previous day
Last week
-73%
10
Compared to previous week
Last month
-26.5%
83
Compared to previous month
Last year
-11.5%
4,698
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
tiny-throttle 🚗
A throttle & debounce package with a tiny file size.
At only 329 bytes it is 83% smaller than lodash's _.debounce()
& _.throttle()
Install
1yarn add tiny-throttle
or
1npm install --save tiny-throttle
or
1<script src="https://unpkg.com/tiny-throttle/dist/tiny-throttle.umd.js"></script>
Then you can find the library on window.tinyThrottle
Usage
1import { debounce, throttle } from 'tiny-throttle' 2 3// on click, run a function 4// then wait 500 miliseconds from last click to run again on next click 5document.getElementById('button').onclick = debounce( 6 doSomethingWithNetwork, 7 500, 8 true, 9) 10 11// on click, wait 500 milliseconds after last click then run a function 12document.getElementById('button').onclick = debounce( 13 doSomethingToTeachUsersToWait, 14 500, 15) 16 17// on click, run a function, then make sure it doesn't get run more than once 18// every 500 miliseconds 19document.getElementById('button').onclick = throttle( 20 doSomethingWithNetwork, 21 500, 22)
License
MIT © Ben Williams
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
Found 0/17 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 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
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 4 are checked with a SAST tool
Reason
11 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
Score
2
/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