unload
Execute code when the js-process exits. On all javascript-environments
react-beforeunload
React component and hook which listens to the beforeunload window event.
page-lifecycle
A JavaScript library to observe Page Lifecycle API states: https://github.com/WICG/page-lifecycle
resnap
Simple API for capturing and resetting Node's require() cache state
on-load
On load/unload events for DOM elements using a MutationObserver