code: function normalizeResourcePath(path) {
      path = path || "";
      while (path.startsWith("/"))
          path = path.slice(1);
      while (path.endsWith("/"))
          path = path.slice(0, -1);
      return path;
  }
docs: Normalizes the path to a resource, so it can be used for storing the observer