listed
Names, the first n of them and how many more.
export function listed(names: string[], n: number): string { return names.length > n ? `${names.slice(0, n).join(", ")}, and ${names.length - n} more` : names.join(", "); }
Names, the first n of them and how many more.
export function listed(names: string[], n: number): string { return names.length > n ? `${names.slice(0, n).join(", ")}, and ${names.length - n} more` : names.join(", "); }