eyzy-tree
Version:
React tree component
19 lines (14 loc) • 346 B
text/typescript
import { isArray } from './index'
const hasOwn = {}.hasOwnProperty
export default function cn(args: any): string {
const result = []
if (isArray(args)) {
return args.join(' ')
}
for (const key in args) {
if (hasOwn.call(args, key) && args[key]) {
result.push(key)
}
}
return result.join(' ')
}