1.0.3 • Published 2 years ago

@reframework/classnames v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@reframework/classnames

A tiny JavaScript utility for conditionally joining classNames together.

Install with npm or Yarn:

# via npm
npm install @reframework/classnames

# via Yarn
yarn add @reframework/classnames

@reframework/classnames follows the SemVer standard for versioning.

There is also a Changelog.

Usage

The getClassName function takes an object. If the value associated with a given key is falsy, that key won't be included in the output.

getClassName({ 'foo-bar': true }); // => 'foo-bar'
getClassName({ 'foo-bar': false }); // => ''

LICENSE MIT

Copyright (c) 2022 Reframework.