# toclassname

> Transforms arguments into a className string suitable for React

Latest version **0.1.1** (published 2015-03-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install toclassname
pnpm add toclassname
yarn add toclassname
bun add toclassname
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2015-03-17 |
| First published | 2015-03-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Daniel Streit |
| Maintainers | dstreit |
| Keywords | react, classes, classname, classnames, classSet |

## Links

- npm: https://www.npmjs.com/package/toclassname
- Repository: https://github.com/danielstreit/toClassName
- Issues: https://github.com/danielstreit/toClassName/issues
- npm.io page: https://npm.io/package/toclassname

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 0.1.1 (latest) — 2015-03-17
- 0.1.0 — 2015-03-17

## README

# toClassName
Transforms arguments into a className string suitable for React.

Inspired by Jed Watson's [classnames] (https://github.com/JedWatson/classnames).

See [JSPerf] (http://jsperf.com/toclassname) tests.

## Example Usage
```
toClassName('foo', 'bar'); // 'foo bar'
toClassName(['foo', 'bar', false]); // 'foo bar'
toClassName('foo', {bar: true}); // 'foo bar'
toClassName({foo: true}, {bar: true}); // 'foo bar'
toClassName({foo: true, bar: true}); // 'foo bar'
```

---
_Source: https://npm.io/package/toclassname · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
