Last active
December 28, 2021 22:54
-
-
Save alexandercerutti/602884de5b6a74c060269dce62c49d66 to your computer and use it in GitHub Desktop.
Bitwise-article-example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const currentScriptState = getCurrentScriptStateSomehow(); | |
if (currentScriptState === States.LOADING) { | |
abortCurrentOperationUntilLoaded(); | |
} | |
if (currentScriptState === States.FAILED) { | |
skipScriptOperation(); | |
} | |
if (currentScriptState === States.LOADED || currentScriptState === States.STOPPED || currentScriptState === States.FAILED) { | |
doSomethingIfScriptIsNotBeingUsed(); | |
} | |
if (currentScriptState === States.PLAYING) { | |
startScriptOperation(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment