couch_set_state.js
// make handler to modify and put the doc
make handler to modify and put the doc
make handler to modify and put the doc
function make_modifier(desired_state){
    if(desired_state.year){
        return make_year_modifier(desired_state.year
                                  ,desired_state.state
                                  ,desired_state.value)
    }else{
        return make_state_modifier(desired_state.state
                                  ,desired_state.value)
    }
}
function make_modifier ( desired_state ) { if ( desired_state . year ) { return make_year_modifier ( desired_state . year , desired_state . state , desired_state . value ) } else { return make_state_modifier ( desired_state . state , desired_state . value ) } }
make handler to modify and put the doc
make handler to modify and put the doc
// modify doc to contain new state value