function argumentFactory(instance, abortablePlugins) {
  // console.log('abortablePlugins', abortablePlugins)
  return function (action, plugin, otherPlugin) {
    const { config, name } = plugin
    let method = `${name}.${action.type}`
    if (otherPlugin) {
      method = otherPlugin.event
    }

    const abortF = (action.type.match(endsWithStartRegex))
      ? abortFunction(name, method, abortablePlugins, otherPlugin, action)
      : notAbortableError(action, method)

    return {
      /* self: plugin, for future maybe */
      // clone objects to avoid reassign
      payload: formatPayload(action),
      instance: instance,
      config: config || {},
      abort: abortF
    }
  }
}
Generate arguments to pass to plugin methods
@param  {Object} instance - analytics instance
@param  {array} abortablePlugins - plugins that can be cancelled by caller
@return {*} function to inject plugin params