export function readAdditionalInfoString(
  item: Record<string, unknown>,
  key: string,
): string | null {
  const info = item.additionalInfo;
  if (!info || typeof info !== "object") return null;
  const value = (info as Record<string, unknown>)[key];
  return typeof value === "string" && value.trim() ? value.trim() : null;
}

export function formatPublishedDate(value: unknown): string {
  if (!value) return "—";
  const text = String(value);
  return text.length >= 10 ? text.slice(0, 10) : text;
}
