sanitizeSafe = function sanitizeSafe(string, part) {
  var sanitized = sanitize(string);

  if (sanitized === '') {
    throw new Error("Invalid ".concat(part, " '").concat(string, "', must include alphanumeric characters"));
  }

  return sanitized;
}
Remove punctuation and illegal characters from a story ID.

See https://gist.github.com/davidjrice/9d2af51100e41c6c4b4a