/easyClassNames

This is a simplified version of ClassNames with high performance in ES6.

Primary LanguageJavaScript

easyClassNames

This is a simplified version of classnames with high performance in ES6.

Installation

Node JS (>=8.4.0)

    npm install easy-classnames
    or
    yarn add easy-classnames

browser

<script src="https://unpkg.com/easy-classnames@1.0.0/dist/easyClassNames.umd.js" />

Usage

ES Modules

import classnames from 'easy-classnames'

common js

const classnames = require('easy-classnames')

browser

var classnames = window.easyClassNames

Usage

easyClassnames only support an object as argument to achieve the best performance without speed penalty.

classNames({ foo: true, bar: true }) // => 'foo bar'

License

MIT