Gathering detailed insights and metrics for time-limit-promise
Gathering detailed insights and metrics for time-limit-promise
Gathering detailed insights and metrics for time-limit-promise
Gathering detailed insights and metrics for time-limit-promise
Fulfill long runinng promises on timeout.
npm install time-limit-promise
100
Supply Chain
74.3
Quality
75.4
Maintenance
100
Vulnerability
100
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
11 Stars
13 Commits
2 Forks
3 Watching
1 Branches
3 Contributors
Updated on 05 Mar 2022
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-1.8%
33,713
Compared to previous day
Last week
-4.4%
184,596
Compared to previous week
Last month
-8.9%
845,187
Compared to previous month
Last year
0%
11,165,602
Compared to previous year
1
Fulfill long runinng promises on timeout.
Unlike other implementations on npm it has some nice extra features:
Promise
implementation of the passed promise: no external implementation dependencies, no global Promise
dependenciesnpm install time-limit-promise
1const timeLimit = require('time-limit-promise'); 2const fetch = require('node-fetch'); 3 4var fetchPromise = fetch('https://github.com/inikulin'); 5 6timeLimit(fetchPromise, 50).then(res => { 7 // If `fetchPromise` will be fulfilled within 50ms 8 // time limited promise will be fullfilled as well. 9 // Otherwise, it will be resolved with the `undefined` value. 10}); 11 12timeLimit(fetchPromise, 50, { resolveWith: 'no content' }).then(res => { 13 // Same as above, but on timeout it will 14 // be resolved with the `no-content` value. 15 console.log(res); // > no-content 16}); 17 18 19timeLimit(fetchPromise, 50, { rejectWith: new Error('timeout') }).catch(err => { 20 // Same as above, but on timeout it will 21 // be rejected with the provided error. 22 console.log(err.message); // > timeout 23}); 24
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 2/9 approved changesets -- score normalized to 2
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
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
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