docs: function createMemorySource(initialPathname = "/") {
      let index = 0;
      let states = [];
      let stack = [{
          pathname: initialPathname,
          search: ""
      }];
  
      let target = {
          // location
          addEventListener(name, fn) {},
          removeEventListener(name, fn) {},
          history: {
              // index
              // entries,
              // state
              back(){},
              pushState(state, _, uri) {
                  index++;
                  stack.push(uri2obj(uri));
                  states.push(state);
                  sync(target);
              },
              replaceState(state, _, uri) {
                  stack[index] = uri2obj(uri);
                  states[index] = state;
                  sync(target);
              }
          }
      };
  
      function sync(target) {
          var history = target.history;
          history.index = index;
          history.entries = stack;
          history.state = states[index];
          target.location = stack[index];
      }
      sync(target);
      return target;
  }