Last active
July 10, 2017 19:54
-
-
Save JoaoCnh/fa6d4315a41575c98b6be06eee164b2a to your computer and use it in GitHub Desktop.
bad refactoring
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); | |
dataIsEmpty && valueCeilIsValid ? runFunctionA(data) : runFunctionB(data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment