text: 'use strict';
  
  exports.__esModule = true;
  exports['default'] = replaceWith;
  
  var _actionTypes = require('./actionTypes');
  
  /**
   * Action creator for triggering a router url replacement. Accepts a payload which is
   * either a pathname or an object with { pathname, query, params, state },
   * corresponding to the params of router.replaceWith().
   * @param  {String|Object} payload - Pathname or object
   * @return {Object} Action object
   */
  
  function replaceWith(pathname, query, state) {
    return {
      type: _actionTypes.REPLACE_WITH,
      payload: { pathname: pathname, query: query, state: state }
    };
  }
  
  module.exports = exports['default'];