7 lines
167 B
TypeScript
7 lines
167 B
TypeScript
|
export function classes(...s: (string | false | null | undefined)[]) {
|
||
|
return s
|
||
|
.flatMap((s) => (s ? s : "").split(" "))
|
||
|
.filter((s) => s)
|
||
|
.join(" ");
|
||
|
}
|