Spaces:
Paused
Paused
Download node_modules/esrun/tools/onExit.js from no1b4me/hytranslator: direct link, hf CLI and curl.
- Browser
- Download file 349 Bytes
-
https://huggingface.co/spaces/no1b4me/hytranslator/resolve/main/node_modules/esrun/tools/onExit.js
- Command line
-
hf download hf://spaces/no1b4me/hytranslator/node_modules/esrun/tools/onExit.js
-
curl -L -o onExit.js https://huggingface.co/spaces/no1b4me/hytranslator/resolve/main/node_modules/esrun/tools/onExit.js
349 Bytes
| export default function onExit(cleanUp) { | |
| // const events = [`exit`, `SIGINT`, `SIGUSR1`, `SIGUSR2`, `uncaughtException`, `SIGTERM`] | |
| for (const event of [ | |
| `exit`, | |
| `SIGINT`, | |
| `SIGUSR1`, | |
| `SIGUSR2`, | |
| `uncaughtException`, | |
| `SIGTERM`, | |
| ]) { | |
| process.on(event, () => cleanUp(event)); | |
| } | |
| } | |