packages/hobbit-navigator/umd/hobbit-navigator.js
function History() {
          var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
          classCallCheck(this, History);

          this.configuration = Object.assign({}, baseConfig, config);
          this.supported = checkSupport(window);
          var _configuration = this.configuration,
              hashbanged = _configuration.hashbanged,
              hashbangPrefix = _configuration.hashbangPrefix,
              location = _configuration.location;
          //Check if a location object in the configuration.

          if (location) {
              //If yes, build the location from that config depending on its type,
              //but do not redirect.
              this.location = (typeof location === 'undefined' ? 'undefined' : _typeof(location)) === 'object' ? location : {
                  path: location,
                  url: '' + (hashbanged ? hashbangPrefix : '') + location,
                  pattern: location,
                  params: {},
                  sender: ''
              };
          } else {
              //If not, build the first location from the URL.
              this.setLocationFromHref();
          }
          //Add an event listener to reset the location on hashbanged
          if (hashbanged) {
              window.addEventListener('hashchange', this.setLocationFromHref.bind(this));
          }
      }
function History() {
          var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
          classCallCheck(this, History);

          this.configuration = Object.assign({}, baseConfig, config);
          this.supported = checkSupport(window);
          var _configuration = this.configuration,
              hashbanged = _configuration.hashbanged,
              hashbangPrefix = _configuration.hashbangPrefix,
              location = _configuration.location;
          //Check if a location object in the configuration.

          if (location) {
              //If yes, build the location from that config depending on its type,
              //but do not redirect.
              this.location = (typeof location === 'undefined' ? 'undefined' : _typeof(location)) === 'object' ? location : {
                  path: location,
                  url: '' + (hashbanged ? hashbangPrefix : '') + location,
                  pattern: location,
                  params: {},
                  sender: ''
              };
          } else {
              //If not, build the first location from the URL.
              this.setLocationFromHref();
          }
          //Add an event listener to reset the location on hashbanged
          if (hashbanged) {
              window.addEventListener('hashchange', this.setLocationFromHref.bind(this));
          }
      }
function History ( ) { var config = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : { } ; classCallCheck ( this , History ) ; this . configuration = Object . assign ( { } , baseConfig , config ) ; this . supported = checkSupport ( window ) ; var _configuration = this . configuration , hashbanged = _configuration . hashbanged , hashbangPrefix = _configuration . hashbangPrefix , location = _configuration . location ; //Check if a location object in the configuration. if ( location ) { //If yes, build the location from that config depending on its type, //but do not redirect. this . location = ( typeof location === 'undefined' ? 'undefined' : _typeof ( location ) ) === 'object' ? location : { path : location , url : '' + ( hashbanged ? hashbangPrefix : '' ) + location , pattern : location , params : { } , sender : '' } ; } else { //If not, build the first location from the URL. this . setLocationFromHref ( ) ; } //Add an event listener to reset the location on hashbanged if ( hashbanged ) { window . addEventListener ( 'hashchange' , this . setLocationFromHref . bind ( this ) ) ; } }
Constructor for the history manager that sets the configuration from
the parameter and the base configuration available in the module.
@param {Object} [config={}] - Configuration that may overwrite the
default configuration of the module.
@param {boolean} [config.hashbanged=false] - Sets whether the router
should set the browser url with a hashbang or not.
@param {string|Object} [config.location=null] - Sets the initial
route inside the route. Can either be a valid location object or a route.
Will not change the location in the browser.
@param {string} [config.hashbangPrefix=#!] - Sets the prefix for
routes when using the hashbanged option.
Constructor for the history manager that sets the configuration from the parameter and the base configuration available in the module .