CoolFace
Apppublic

Henhouse/workflow-comics

sourceHugging Faceupdated 3y agoView on Hugging Face
0likes
joinWords.ts6 linesDownload Raw Back to lib
1// clean a list of words (which may be null, undefined or empty)2// into one clean string of separator-divided (by default comma-separated) words3// the words will be trimmed, and empty elements will be removed4export function joinWords(inputs: any[] = [], separator = ", "): string {5  return inputs.map(x => `${x || ""}`.trim()).filter(x => x).join(separator)6}