Last active
July 10, 2017 19:55
-
-
Save JoaoCnh/53f339d8aba5d20fece505ff6750b931 to your computer and use it in GitHub Desktop.
refactored code
This file contains 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 dataIsEmpty = data.length === 0; | |
const valueCeil = Math.ceil(data.someValue); | |
const valueCeilIsValid = helperClass.isValid(valueCeil); | |
if (dataIsEmpty && valueCeilIsValid) { | |
runFunctionA(data); | |
} else { | |
runFunctionB(data); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment