Gathering detailed insights and metrics for axios-rate-limit
Gathering detailed insights and metrics for axios-rate-limit
Gathering detailed insights and metrics for axios-rate-limit
Gathering detailed insights and metrics for axios-rate-limit
npm install axios-rate-limit
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
237 Stars
94 Commits
35 Forks
3 Watching
1 Branches
8 Contributors
Updated on 05 Nov 2024
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
3.8%
16,442
Compared to previous day
Last week
3.3%
82,580
Compared to previous week
Last month
8.3%
349,277
Compared to previous month
Last year
25.2%
3,781,770
Compared to previous year
1
1
A rate limit for Axios: set how many requests per interval should perform immediately, other will be delayed automatically.
1npm install axios-rate-limit
1import axios from 'axios'; 2import rateLimit from 'axios-rate-limit'; 3 4// sets max 2 requests per 1 second, other will be delayed 5// note maxRPS is a shorthand for perMilliseconds: 1000, and it takes precedence 6// if specified both with maxRequests and perMilliseconds 7const http = rateLimit(axios.create(), { maxRequests: 2, perMilliseconds: 1000, maxRPS: 2 }) 8http.getMaxRPS() // 2 9http.get('https://example.com/api/v1/users.json?page=1') // will perform immediately 10http.get('https://example.com/api/v1/users.json?page=2') // will perform immediately 11http.getQueue() // [{...}] 12http.get('https://example.com/api/v1/users.json?page=3') // will perform after 1 second from the first one 13 14// options hot-reloading also available 15http.setMaxRPS(3) 16http.getMaxRPS() // 3 17http.setRateLimitOptions({ maxRequests: 6, perMilliseconds: 150 }) // same options as constructor
Consider using Axios built-in rate-limiting functionality.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
dependency not pinned by hash detected -- score normalized to 6
Details
Reason
Found 2/18 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
19 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
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@ts4/api
<https://github.com/aishek/axios-rate-limit> <https://github.com/JustinBeckwith/retry-axios>
@hokify/axios-rate-limit
Rate limit for axios.
express-rate-limit
Basic IP rate-limiting middleware for Express. Use to limit repeated requests to public APIs and/or endpoints such as password reset.
@1xtr/axios-rate-limit
Rate limit for axios.