docs: function parseRepoAndRef(arg, defaultIndex) {
      // Parse off the tag/digest per
      // JSSTYLED
      // https://github.com/docker/docker/blob/0c7b51089c8cd7ef3510a9b40edaa139a7ca91aa/pkg/parsers/parsers.go#L69
      var repo, tag, digest;
      var atIdx = arg.lastIndexOf('@');
      if (atIdx !== -1) {
          repo = arg.slice(0, atIdx);
          digest = arg.slice(atIdx + 1);
      } else {
          var colonIdx = arg.lastIndexOf(':');
          var slashIdx = arg.lastIndexOf('/');
          if (colonIdx !== -1 && colonIdx > slashIdx) {
              repo = arg.slice(0, colonIdx);
              tag = arg.slice(colonIdx + 1);
          } else {
              repo = arg;
          }
      }
  
      var info = parseRepo(repo, defaultIndex);
      if (digest) {
          info.digest = digest;
      } else if (tag) {
          info.tag = tag;
      } else {
          info.tag = DEFAULT_TAG;
      }
  
      return info;
  }