Spracherkennung für: .ts vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]
import { normalizeLowercaseStringOrEmpty } from "../shared/string-coerce.js";
type RuntimeStatusFormatInput = {
status?: string;
pid?: number;
state?: string;
details?: string[];
};
export function formatRuntimeStatusWithDetails({
status,
pid,
state,
details = [],
}: RuntimeStatusFormatInput): string {
const runtimeStatus = status?.trim() || "unknown";
const fullDetails: string[] = [];
if (pid) {
fullDetails.push(`pid ${pid}`);
}
const normalizedState = state?.trim();
if (
normalizedState &&
normalizeLowercaseStringOrEmpty(normalizedState) !==
normalizeLowercaseStringOrEmpty(runtimeStatus)
) {
fullDetails.push(`state ${normalizedState}`);
}
for (const detail of details) {
const normalizedDetail = detail.trim();
if (normalizedDetail) {
fullDetails.push(normalizedDetail);
}
}
return fullDetails.length > 0 ? `${runtimeStatus} (${fullDetails.join(", ")})` : runtimeStatus;
}
¤ Dauer der Verarbeitung: 0.17 Sekunden
(vorverarbeitet am 2026-04-27)
¤
*© Formatika GbR, Deutschland