lib/disconnect.js
function disconnect (state) {
  if (state.replication) {
    state.replication.cancel()
    delete state.replication
    state.emitter.emit('disconnect')
  }

  return Promise.resolve()
}
function disconnect (state) {
  if (state.replication) {
    state.replication.cancel()
    delete state.replication
    state.emitter.emit('disconnect')
  }

  return Promise.resolve()
}
function disconnect ( state ) { if ( state . replication ) { state . replication . cancel ( ) delete state . replication state . emitter . emit ( 'disconnect' ) } return Promise . resolve ( ) }
disconnects local and remote database

@return {Promise}
disconnects local and remote database