# classtime

> An uber minimal set of class manipulation methods

Latest version **1.0.0** (published 2016-06-08) · ISC license · 0 weekly downloads

## Install

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

## 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.0.0 |
| Published | 2016-06-08 |
| First published | 2016-06-08 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Bryan Ross |
| Maintainers | rossipedia |
| Keywords | css, classes |

## Links

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

## Alternatives

- [style-dictionary](https://npm.io/package/style-dictionary.md) — 2.0M weekly downloads
- [postcss-merge-idents](https://npm.io/package/postcss-merge-idents.md) — 1.7M weekly downloads
- [@fontsource/noto-sans](https://npm.io/package/@fontsource/noto-sans.md) — 93.0K weekly downloads
- [uglifycss](https://npm.io/package/uglifycss.md) — 71.6K weekly downloads
- [mat4-interpolate](https://npm.io/package/mat4-interpolate.md) — 23.3K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2016-06-08

## README

# classtime

A handful (literally) of class list manipulation functions

## API

### `hasClass(classes, name)`

Returns `true` if `name` is found in the list of `classes`

### `removeClass(classes, name)`

Removes `name` from `classes`

### `addClass(classes, name)`

Adds `name` to `classes` if it's not already there

### `toggleClass(classes, name)`

Add `name` to `classes` if not found, otherwise removes it

### `swapClasses(classes, a, b)`

If `a` is found in `classes`, remove it and add `b`, otherwise remove `b` and add `a`



That's it. Nothing more to see here. Move along.

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