joinclass
v1.0.0
Published
Join and convert list class (Remade)
Downloads
51
Maintainers
Readme
Description
- Join and convert list class
- Simple for test (classNames)
Usage
Install the package
npm install --save joinclass
Import the module in the place you want to use:
import classes from "joinclass";
Snippet
classes('abcd', 'abcd ', undefined, false) => 'abcd'
classes(['abcd', 'abcd ', undefined, false]) => 'abcd'
classes({ 'abcd': true }, null, '', 'z') => 'abcd z'
classes({ 'abcd': true }, null, ' ', 'z') => 'abcd z'
const clazz = { 'abcd': true }
const clazz2 = ['abcd', 'defg']
classes(clazz, clazz2, null, '', 'z') => 'abcd defg z'
License
MIT