# mariosant-cn

> Just add `@mariosant/cn` to your `package.json`.

Latest version **0.0.3** (published 2019-12-17) · MIT* license · 0 weekly downloads

## Install

```sh
npm install mariosant-cn
pnpm add mariosant-cn
yarn add mariosant-cn
bun add mariosant-cn
```

## Health

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

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2019-12-17 |
| First published | 2019-12-17 |
| Weekly downloads | 0 |
| License | MIT* |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | mariosant |

## Links

- npm: https://www.npmjs.com/package/mariosant-cn
- npm.io page: https://npm.io/package/mariosant-cn

## Recent versions

- 0.0.3 (latest) — 2019-12-17
- 0.0.2 — 2019-12-17

## README

![Cn](cn.png)

> Easy class names handling!

[![NPM version](https://img.shields.io/npm/v/@mariosant/cn.svg)](https://www.npmjs.com/package/@mariosant/cn)
[![CircleCI](https://circleci.com/gh/mariosant/cn/tree/master.svg?style=svg)](https://circleci.com/gh/mariosant/cn/tree/master)

Cn is a simple utility to help you manage class names in the modern app development ecosystem.

## Installation

Just add `@mariosant/cn` to your `package.json`.

```bash
$ npm install @mariosant/cn

# or
$ yarn add @mariosant/cn
```

You can now import the module and use it like

```javascript
import cn from "@mariosant/cn";
```

## Usage

Using cn is pretty simple. It is inspired by the well known [Classnames](https://github.com/JedWatson/classnames) package, but solves a few edge cases.

```javascript
import cn from '@mariosant/cn';

const isActive = true;
const SomeComponent = () => <Button className={cn('btn', [isActive, 'active', 'inactive'])} .../>
```

## Development

Easy enough! No build required.

```bash
$ yarn install  # to install dependencies
$ yarn test     # to run the test suite
```

## Meta

Marios Antonoudiou – [@marios_ant](https://twitter.com/marios_ant) – mariosant@sent.com

Distributed under the MIT license.

[https://github.com/mariosant/cn](https://github.com/mariosant/cn)

## Contributing

1. Fork it (<https://github.com/mariosant/cn/fork>)
2. Create your feature branch (`git checkout -b feature/fooBar`)
3. Commit your changes using a semantic commit message.
4. Push to the branch (`git push origin feature/fooBar`)
5. Create a new Pull Request

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