docs: function eventToPromise (emitter, event, opts) {
    var cancel
    var promise = new Promise(function (resolve, reject) {
      var addEvent = makeEventAdder(emitter, opts && opts.array)
      cancel = function () {
        cancel = noop
        addEvent.cleanUp()
      }
  
      addEvent(event, resolve)
  
      if (!opts || !opts.ignoreErrors) {
        addEvent((opts && opts.error) || 'error', reject)
      }
    })
    promise.cancel = function () { return cancel() }
  
    return promise
  }