export function safeJson(v: unknown): string {
  try {
    return JSON.stringify(v)
  }
  catch {
    return '"[unserializable]"'
  }
}

export function normalizeText(s: string): string {
  return s.replace(/\r/g, '').trimEnd()
}
