# @supercharge/classes

> Class utilities for Node.js and JavaScript

Latest version **2.0.0** (published 2022-10-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install @supercharge/classes
pnpm add @supercharge/classes
yarn add @supercharge/classes
bun add @supercharge/classes
```

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2022-10-08 |
| First published | 2020-02-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=14 |
| Dependencies | 0 |
| Unpacked size | 9.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | Marcus Pöhls |
| Maintainers | marcuspoehls, peitek, celsiusf |
| Keywords | nodejs, class, utilities, functions, utilities, class-utilities, supercharge, superchargejs |

## Links

- npm: https://www.npmjs.com/package/@supercharge/classes
- Repository: https://github.com/supercharge/classes
- Issues: https://github.com/supercharge/classes/issues
- npm.io page: https://npm.io/package/@supercharge/classes

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2022-10-08
- 1.10.0 — 2022-04-25
- 1.9.0 — 2021-12-01
- 1.8.0 — 2021-10-29
- 1.7.0 — 2021-10-18
- 1.6.0 — 2021-10-18
- 1.5.0 — 2021-08-22
- 1.4.0 — 2021-01-07
- 1.3.0 — 2020-06-09
- 1.2.0 — 2020-04-14
- 1.1.0 — 2020-04-14
- 1.0.0 — 2020-02-15

## README

<div align="center">
  <a href="https://superchargejs.com">
    <img width="471" style="max-width:100%;" src="https://superchargejs.com/images/supercharge-text.svg" />
  </a>
  <br/>
  <br/>
  <p>
    <h3>Classes</h3>
  </p>
  <p>
    Class utilities for Node.js and JavaScript
  </p>
  <br/>
  <p>
    <a href="#installation"><strong>Installation</strong></a> ·
    <a href="#usage"><strong>Usage</strong></a> ·
    <a href="#api"><strong>API</strong></a>
  </p>
  <br/>
  <br/>
  <p>
    <a href="https://www.npmjs.com/package/@supercharge/classes"><img src="https://img.shields.io/npm/v/@supercharge/classes.svg" alt="Latest Version"></a>
    <a href="https://www.npmjs.com/package/@supercharge/classes"><img src="https://img.shields.io/npm/dm/@supercharge/classes.svg" alt="Monthly downloads"></a>
  </p>
  <p>
    <em>Follow <a href="http://twitter.com/marcuspoehls">@marcuspoehls</a> and <a href="http://twitter.com/superchargejs">@superchargejs</a> for updates!</em>
  </p>
</div>

---

## Introduction
The `@supercharge/classes` package provides a handful methods around classes in Node.js and JavaScript. For example, determine whether a given input is a class using the `.isClass(input)` method.


## Installation

```
npm i @supercharge/classes
```


## Usage
Using `@supercharge/classes` is pretty straightforward. Install and import the package and use it right away:

```js
const { isClass } = require('@supercharge/classes')

isClass(class Rabbit {})
// true

isClass(function classLikeRabbitFunc () {})
// false
```


## API

#### `isClass(input)`
Determine whether the given `input` is a class.

```js
const { isClass } = require('@supercharge/classes')

isClass(class YourClass {})
// true
```


#### `isFunction(input)`
Determine whether the given `input` is a function.

```js
const { isFunction } = require('@supercharge/classes')

isFunction(function sum () {})
// true
```


## Contributing
Do you miss a class-related function? We very much appreciate your contribution! Please send in a pull request 😊

1.  Create a fork
2.  Create your feature branch: `git checkout -b my-feature`
3.  Commit your changes: `git commit -am 'Add some feature'`
4.  Push to the branch: `git push origin my-new-feature`
5.  Submit a pull request 🚀


## License
MIT © [Supercharge](https://superchargejs.com)

---

> [superchargejs.com](https://superchargejs.com) &nbsp;&middot;&nbsp;
> GitHub [@supercharge](https://github.com/supercharge) &nbsp;&middot;&nbsp;
> Twitter [@superchargejs](https://twitter.com/superchargejs)

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