code: function computeNavigation(commands) {
      if ((typeof commands[0] === 'string') && commands.length === 1 && commands[0] === '/') {
          return new Navigation(true, 0, commands);
      }
      var numberOfDoubleDots = 0;
      var isAbsolute = false;
      var res = commands.reduce(function (res, cmd, cmdIdx) {
          if (typeof cmd === 'object' && cmd != null) {
              if (cmd.outlets) {
                  var outlets_1 = {};
                  forEach(cmd.outlets, function (commands, name) {
                      outlets_1[name] = typeof commands === 'string' ? commands.split('/') : commands;
                  });
                  return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(res, [{ outlets: outlets_1 }]);
              }
              if (cmd.segmentPath) {
                  return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(res, [cmd.segmentPath]);
              }
          }
          if (!(typeof cmd === 'string')) {
              return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(res, [cmd]);
          }
          if (cmdIdx === 0) {
              cmd.split('/').forEach(function (urlPart, partIndex) {
                  if (partIndex == 0 && urlPart === '.') ;
                  else if (partIndex == 0 && urlPart === '') { //  '/a'
                      isAbsolute = true;
                  }
                  else if (urlPart === '..') { //  '../a'
                      numberOfDoubleDots++;
                  }
                  else if (urlPart != '') {
                      res.push(urlPart);
                  }
              });
              return res;
          }
          return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__spread"])(res, [cmd]);
      }, []);
      return new Navigation(isAbsolute, numberOfDoubleDots, res);
  }
docs: Transforms commands to a normalized `Navigation`