alias state.get() as state.toJSON() so that we can do JSON.stringify( state ) and get a useful result
add tests for #8