Download wp-calypso/desktop/app/lib/app-quit/index.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 383 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/desktop/app/lib/app-quit/index.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/desktop/app/lib/app-quit/index.js
-
curl -L -o index.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/desktop/app/lib/app-quit/index.js
383 Bytes
| /** | |
| * Module variables | |
| */ | |
| let quitter = false; | |
| function AppQuit() { | |
| this.canQuit = false; | |
| } | |
| AppQuit.prototype.shouldQuitToBackground = function () { | |
| if ( this.canQuit ) { | |
| this.canQuit = false; | |
| return false; | |
| } | |
| return true; | |
| }; | |
| AppQuit.prototype.allowQuit = function () { | |
| this.canQuit = true; | |
| }; | |
| if ( ! quitter ) { | |
| quitter = new AppQuit(); | |
| } | |
| module.exports = quitter; | |