Skip to content

Instantly share code, notes, and snippets.

@kyleparisi
Created July 25, 2016 21:06
Show Gist options
  • Save kyleparisi/b560e58b49a8ec68a3b3dd18ea73db86 to your computer and use it in GitHub Desktop.
Save kyleparisi/b560e58b49a8ec68a3b3dd18ea73db86 to your computer and use it in GitHub Desktop.
All values are true in js object
// If all inputs are valid return true
let allValid = Object.keys(state).reduce((prev, curr) => (prev && state[curr].valid) ? true : false, true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment