Fire an event no matter how a process exits.
signal-exit fires an event no matter how a process exits:
- reaching the end of execution.
- explicitly having
- receiving a fatal signal from outside the process
npm install signal-exit
1 2 3 4 5