code: function normalize(p) {
      var isAbsolutePath = isAbsolute(p);
      var trailingSlash = p && p[p.length - 1] === '/';
  
      p = normalizeArray(p.split('/'), !isAbsolutePath).join('/');
  
      if (!p && !isAbsolutePath) {
        p += '.';
      }
      if (p && trailingSlash) {
        p += '/';
      }
      return (isAbsolutePath ? '/' : '') + p;
    }
docs: normalize pathname
  @param {String} p <pathname>
  @return {String}