# classist

> Manage classes on an element without reguard for external modification.

Latest version **1.1.1** (published 2017-11-08) · ISC license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2017-11-08 |
| First published | 2015-07-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | korynunn |

## Links

- npm: https://www.npmjs.com/package/classist
- Repository: https://github.com/KoryNunn/classist
- Homepage: https://github.com/KoryNunn/classist#readme
- Issues: https://github.com/KoryNunn/classist/issues
- npm.io page: https://npm.io/package/classist

## Recent versions

- 1.1.1 (latest) — 2017-11-08
- 1.1.0 — 2015-12-07
- 1.0.1 — 2015-08-04
- 1.0.0 — 2015-07-28

## README

# Classist

Manage classes on an element without reguard for external modification.

## why.

Sometimes you want to modify the classes on an element but in a somewhat encapsulated style.
Say you have a component that has a standard class like `"modal"`, and you want to be able to
define its list of classes that changes over time, without effecting the `"modal"` class..

## Usage

```javascript
var classis = require('classist');

// Make or aquire an element
var element = crel('div', {class: 'some thing'});

// Classist it.
var elementClasses = classist(element);

// Get classist classes (there are none so far)
elementClasses(); // -> ''

// set classist classes
elementClasses('foo bar');

// get element.className
element.className; // -> 'some thing foo bar'

// Get classist classes again.
elementClasses(); // -> 'foo bar'

```

See tests for more examples.

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