Created
March 16, 2018 14:45
-
-
Save jonpemby/ef386f9b39c4e75ea5eec789e6e93cf1 to your computer and use it in GitHub Desktop.
JavaScript one liner to determine if multiple strings/arrays are empty
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
export default (...fields) => [...fields].reduce((sum, { length }) => sum + length, 0) === 0; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
repl.it with tests: https://repl.it/@developingfaith/OurUnhappyDesigners