You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RELOG/node_modules/classcat/index.cjs

20 lines
412 B

module.exports = function cc(names) {
if (typeof names === "string" || typeof names === "number") return "" + names
let out = ""
if (Array.isArray(names)) {
for (let i = 0, tmp; i < names.length; i++) {
if ((tmp = cc(names[i])) !== "") {
out += (out && " ") + tmp
}
}
} else {
for (let k in names) {
if (names[k]) out += (out && " ") + k
}
}
return out
}