pushHistory(route) {
    let state = route;
    // If the route doesn't exist and there ISN'T any 404 function handler
    if (!this.routes[route] && !this.routes['*']) {
      console.log(`Error: route ${route} doesn't exist`);
      return false;
    // If the route doesn't exist but there IS a 404 function handler
    } else if (!this.routes[route]) {
      state = '*';
    }
    
    history.pushState({route: state}, '', `${this.base}${route}`);
    return true;
  }
/**
   * Adds the given route and state to history so forward and backward navigation will work
   * @param {string} route the route to add to history
   * @returns {boolean} whether or not the route was real and valid in the routes object
   */
Adds the given route and state to history so forward and backward navigation will work
@param {string} route the route to add to history
@returns {boolean} whether or not the route was real and valid in the routes object
Adds the given route and state to history so forward and backward navigation will work @param { string } route the route to add to history @returns { boolean } whether or not the route was real and valid in the routes object
pushHistory(route) {
    let state = route;
    if (!this.routes[route] && !this.routes['*']) {
      console.log(`Error: route ${route} doesn't exist`);
      return false;
    } else if (!this.routes[route]) {
      state = '*';
    }
    history.pushState({route: state}, '', `${this.base}${route}`);
    return true;
  }
pushHistory ( route ) { let state = route ; if ( ! this . routes [ route ] && ! this . routes [ '*' ] ) { console . log ( ` ${ route } ` ) ; return false ; } else if ( ! this . routes [ route ] ) { state = '*' ; } history . pushState ( { route : state } , '' , ` ${ this . base } ${ route } ` ) ; return true ; }
Adds the given route and state to history so forward and backward navigation will work
 @param {string} route the route to add to history
 @returns {boolean} whether or not the route was real and valid in the routes object
Adds the given route and state to history so forward and backward navigation will work @param { string } route the route to add to history @returns { boolean } whether or not the route was real and valid in the routes object
// If the route doesn't exist and there ISN'T any 404 function handler // If the route doesn't exist but there IS a 404 function handler