function callCallbacks(sender, err, cb) {
  if (typeof cb === 'function') cb(err);

  for (let i = 0; i < sender._queue.length; i++) {
    const params = sender._queue[i];
    const callback = params[params.length - 1];

    if (typeof callback === 'function') callback(err);
  }
}
Calls queued callbacks with an error.

@param {Sender} sender The `Sender` instance
@param {Error} err The error to call the callbacks with
@param {Function} [cb] The first callback
@private