Build a utility that merges class names together. It should accept strings, objects with boolean values, and arrays, then return a single string of combined class names where only truthy values are included.
Examples
Input:["foo","bar"]
Output:"foo bar"
Input:["foo",{"bar":true,"duck":false}]
Output:"foo bar"
Hints
Process each argument - strings are directly added, objects add keys where the value is truthy.
Skip falsy values (null, undefined, false, 0, empty string) from the result.
Flatten arrays and process each element recursively.
Classnames
Implement a function that conditionally joins CSS class names together based on strings or objects.