https://github.com/stephanhoyer/classies
Simple css class builder
https://github.com/stephanhoyer/classies
css
Last synced: 4 months ago
JSON representation
Simple css class builder
- Host: GitHub
- URL: https://github.com/stephanhoyer/classies
- Owner: StephanHoyer
- License: mit
- Created: 2017-09-23T21:27:40.000Z (almost 8 years ago)
- Default Branch: next
- Last Pushed: 2024-11-17T13:46:44.000Z (8 months ago)
- Last Synced: 2025-03-18T08:48:18.569Z (4 months ago)
- Topics: css
- Language: JavaScript
- Size: 102 KB
- Stars: 10
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: changelog.md
- License: LICENSE
Awesome Lists containing this project
README
# classies

[](https://renovatebot.com)
Simple css class string builder without shenanigans.
## install
```
npm install classies
```## usage
```js
const cls = require("classies");
const isSelected = true;let classString = cls(
{
foo: true,
bar: someCondition,
[classString]: true,
isSelected,
},
separator
); // separator defaults to ' '
```## perfomance
see [jsperf](https://jsperf.com/cls/1)
Latest version was done by [@isiahmeadows](https://github.com/isiahmeadows) and [@gamb](https://github.com/gamb).
If you have a better version, feel free to submit a PR.
## releases
Releases are automated by [pr-release](http://pr-release.org/)