function createResultIdentifier(searchP, cfg, refP) {
  // why encodeURIComponent: filters out slashes for path names for stuff like @lion/button
  const format = (/** @type {Project} */ p) =>
    `${encodeURIComponent(p.name)}_${p.version || (p.commitHash && p.commitHash.slice(0, 5))}`;
  const cfgHash = hash(cfg);
  return `${format(searchP)}${refP ? `_+_${format(refP)}` : ''}__${cfgHash}`;
}
Should be used to write results to and read results from the file system.
Creates a unique identifier based on searchP, refP (optional) and an already created
@param {Project} searchP search target project meta
@param {AnalyzerConfig} cfg configuration used for analyzer
@param {Project} [refP] reference project meta
@returns {string} identifier