Skip to content

Instantly share code, notes, and snippets.

View dechowdev's full-sized avatar
🚴‍♂️
Office working!

Lucas Dechow dechowdev

🚴‍♂️
Office working!
View GitHub Profile
@dechowdev
dechowdev / cn.js
Created July 20, 2021 07:53
Classname Util
const cn = (arr) =>
arr
.map((v) => {
const vals =
v &&
Object.keys(v).filter((k) => {
return v[k] && typeof v !== "string";
});
return v?.length > 0 ? v : null || (vals && vals.flat()) || v;
})