# @f/has-class

> Check whether or not an element has a class

Latest version **0.1.1** (published 2016-03-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install @f/has-class
pnpm add @f/has-class
yarn add @f/has-class
bun add @f/has-class
```

## 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 | 2016-03-01 |
| First published | 2016-03-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | f |

## Links

- npm: https://www.npmjs.com/package/@f/has-class
- Repository: https://github.com/micro-js/has-class
- Homepage: https://github.com/micro-js/has-class#readme
- Issues: https://github.com/micro-js/has-class/issues
- npm.io page: https://npm.io/package/@f/has-class

## Recent versions

- 0.1.1 (latest) — 2016-03-01

## README

# has-class

[![Build status][travis-image]][travis-url]
[![Git tag][git-image]][git-url]
[![NPM version][npm-image]][npm-url]
[![Code style][standard-image]][standard-url]

Check whether or not an element has a class

## Installation

    $ npm install @f/has-class

## Usage

```js
var hasClass = require('@f/has-class')

if (hasClass('show', element)) {
  removeClass('show', element)
  addClass('hide', element)
}
```

## API

### hasClass(className, element)

- `className` - The class you want to see if `element` has
- `element` - The element you want to check for `className`

**Returns:** A Boolean value indicating whether or not `element` has `className` in its class list.

## License

MIT

[travis-image]: https://img.shields.io/travis/micro-js/has-class.svg?style=flat-square
[travis-url]: https://travis-ci.org/micro-js/has-class
[git-image]: https://img.shields.io/github/tag/micro-js/has-class.svg?style=flat-square
[git-url]: https://github.com/micro-js/has-class
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[standard-url]: https://github.com/feross/standard
[npm-image]: https://img.shields.io/npm/v/@f/has-class.svg?style=flat-square
[npm-url]: https://npmjs.org/package/@f/has-class

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