Package Exports
- @reframework/classnames
- @reframework/classnames/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@reframework/classnames) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@reframework/classnames
A tiny JavaScript utility for conditionally joining classNames together.
# 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.