classnames-lodash
classnames
, rewritten using lodash
.
classnames
is still being maintained. This is not a replacement for classnames
.
classnames
is a fantastic library. With no dependencies, it efficiently produces a classlist from a slew of parameter types and combinations. This is a personal exercise in producing, testing, profiling, and documenting an open-source software package.
Installation
npm install classnames-lodash
Usage
import classnames from 'classnames-lodash'
classnames('foo', undefined, 'bar', null)
Todo
Development
If you're looking to work on this project, please use the following npm
scripts to run benchmarks and tests.
Command | Effect |
---|
lint | Lints all source code in the project and displays warnings and errors to the console. |
fix | Lints all source code and fixes fixable errors in place. |
test | Runs all tests for this project. |
test-watch | Runs all tests for this project, then watches for file changes, repeat. |
benchmark | Runs benchmarks for this project and displays results on the console. |