@reframework/classnames
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

@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.

Package Sidebar

Install

npm i @reframework/classnames

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

8.03 kB

Total Files

19

Last publish

Collaborators

  • phls