# class-chain

> Returns an object’s class and its ancestors.

Latest version **1.0.0** (published 2017-02-13) · MIT license · 0 weekly downloads

## Install

```sh
npm install class-chain
pnpm add class-chain
yarn add class-chain
bun add class-chain
```

## 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 | 2017-02-13 |
| First published | 2017-02-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4.0.0 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | John Lamansky |
| Maintainers | lamansky |
| Keywords | object, class, function, prototype, constructor, chain, ancestors, extends |

## Links

- npm: https://www.npmjs.com/package/class-chain
- Repository: https://github.com/lamansky/class-chain
- Issues: https://github.com/lamansky/class-chain/issues
- npm.io page: https://npm.io/package/class-chain

## Dependencies (1)

- [is-object](https://npm.io/package/is-object.md) ^1.0.1

## Recent versions

- 1.0.0 (latest) — 2017-02-13

## README

# class-chain

A [Node.js](https://nodejs.org/) module that returns an object’s class and its ancestors.

## Installation

```bash
npm install class-chain --save
```

## Usage

```javascript
const getClassChain = require('class-chain')

class A {}
class B extends A {}

let b = new B()

getClassChain(b) // [B, A]
getClassChain.names(b) // ['B', 'A']
```

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