Converting a state from hash into a JavaScript object
I think a good practice is to name what you mean, cause that makes the code more readable. So I would create a var for each state and grap a good name: stateOfViewAvailable ...