Track the list of currently unhandled promise rejections
Installations
npm install currently-unhandled
Releases
Unable to fetch releases
Developer
jamestalmage
Developer Guide
Module System
UMD
Min. Node Version
>=0.10.0
Typescript Support
No
Node Version
5.10.1
NPM Version
3.8.6
Statistics
24 Stars
13 Commits
4 Forks
3 Watching
1 Branches
1 Contributors
Updated on 12 Apr 2022
Bundle Size
1.12 kB
Minified
518.00 B
Minified + Gzipped
Languages
JavaScript (100%)
Total Downloads
Cumulative downloads
Total Downloads
2,108,379,943
Last day
-5.2%
871,021
Compared to previous day
Last week
1.8%
5,210,115
Compared to previous week
Last month
27.6%
20,565,905
Compared to previous month
Last year
-31.2%
213,092,882
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
currently-unhandled
Track the list of currently unhandled promise rejections.
Install
$ npm install --save currently-unhandled
Usage
1const currentlyUnhandled = require('currently-unhandled')(); // <- note the invocation 2 3var fooError = new Error('foo'); 4var p = Promise.reject(new Error('foo')); 5 6// on the next tick - unhandled rejected promise is added to the list: 7currentlyUnhandled(); 8//=> [{promise: p, reason: fooError}]' 9 10p.catch(() => {}); 11 12// on the next tick - handled promise is now removed from the list: 13currentlyUnhandled(); 14//=> [];
API
currentlyUnhandled()
Returns an array of objects with promise
and reason
properties representing the rejected promises that currently do not have a rejection handler. The list grows and shrinks as unhandledRejections are published, and later handled.
Browser Support
This module can be bundled with browserify
. At time of writing, it will work with native Promises in the Chrome browser only. For best cross-browser support, use bluebird
instead of native Promise support in browsers.
License
MIT © James Talmage
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 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 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
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 1 are checked with a SAST tool
Score
3
/10
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