code: function(path) {
            /* If the path starts with a protocol+host, store it and remove it (add it
               back later) so we don't accidently modify it. */
            var protocol = path.match(HOST);
            if (protocol) { path = protocol[2]; }
  
            /* Remove multiple slashes and trivial dots (`/./ -> /`). */
            path = path.replace(/\/+/g, '/').replace(/\/\.\//g, '/');
  
            /* Loop to collapse instances of `../` in the path by matching a previous
               path segment.  Essentially, we find substrings of the form `/abc/../`
               where abc is not `.` or `..` and replace the substrings with `/`.
               We loop until the string no longer changes since after collapsing
               possible instances once, we may have created more instances that can
               be collapsed.
            */
            var o;
            while((o = path) != (path = path.replace(/(^|\/)(?!\.?\.\/)([^\/]+)\/\.\.\//g, '$1'))) {}
            /* Don't forget to prepend any protocol we might have removed earlier. */
            return protocol ? protocol[1] + path.replace(/^\//, '') : path;
          }
docs: `resolveRelativePath` removes relative path indicators.  For example: util.resolveRelativePath('a/../b') -> b