prefixId = (prefixGenerator, body) => {
  const prefix = prefixGenerator(body);
  if (body.startsWith(prefix)) {
    return body;
  }
  return prefix + body;
}
Prefix the given string, unless it already starts with the generated prefix.

@param {(id: string) => string} prefixGenerator Function to generate a prefix.
@param {string} body An arbitrary string.
@returns {string} The given string with a prefix prepended to it.