openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
12 lines (11 loc) • 410 B
JavaScript
import "./src-H3RMXyFL.mjs";
import { t as expectDefined } from "./expect-DDakjvvQ.mjs";
//#region src/shared/human-list.ts
function formatHumanList(e) {
if (e.length === 0) return "";
if (e.length === 1) return expectDefined(e[0], "values entry at 0");
if (e.length === 2) return `${e[0]} or ${e[1]}`;
return `${e.slice(0, -1).join(", ")}, or ${e.at(-1)}`;
}
//#endregion
export { formatHumanList as t };