File tree Expand file tree Collapse file tree 2 files changed +10
-21
lines changed Expand file tree Collapse file tree 2 files changed +10
-21
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ const { unhandledRejection } = require('./unhandled_rejection')
55const { rejectionHandled } = require ( './rejection_handled' )
66const { multipleResolves } = require ( './multiple_resolves' )
77const { warning } = require ( './warning' )
8- const { all } = require ( './all' )
98
109const EVENTS = {
1110 uncaughtException,
@@ -15,9 +14,19 @@ const EVENTS = {
1514 warning,
1615}
1716
17+ // Emit all process error events
18+ const all = async function ( ) {
19+ // eslint-disable-next-line fp/no-loops
20+ for ( const emitEvent of Object . values ( EVENTS ) ) {
21+ // eslint-disable-next-line no-await-in-loop
22+ await emitEvent ( )
23+ }
24+ }
25+
1826const ALL_EVENTS = { ...EVENTS , all }
1927
2028module . exports = {
29+ all,
2130 EVENTS ,
2231 ALL_EVENTS ,
2332}
You can’t perform that action at this time.
0 commit comments