off

function
 off() 

Option name Type Description
eventName String

Name of event, one of listed above

handler Function

callback for event

removes a listener for the specified event

It will unsubscribe at most, one instance of a listener for a particular event.
If any single listener has subcribed multiple times to the same event,
then off must be called multiple times.

Supported events:

  • add
  • update
  • remove
  • change
function off (state, eventName, handler) {
  state.emitter.removeListener(eventName, handler)

  return this
}