# get-prototype

> Validates and returns a function’s prototype.

Latest version **1.0.0** (published 2017-01-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install get-prototype
pnpm add get-prototype
yarn add get-prototype
bun add get-prototype
```

## 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-01-29 |
| First published | 2017-01-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | John Lamansky |
| Maintainers | lamansky |
| Keywords | function, prototype |

## Links

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

## Dependencies (1)

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

## Recent versions

- 1.0.0 (latest) — 2017-01-29

## README

# get-prototype

* When passed a function, returns its prototype.
* Throws an error if the prototype is null.
* When passed an object, assumes it’s a prototype and returns it as-is.

Packaged as a [Node.js](https://nodejs.org/en/) module.

## Installation

```
npm install get-prototype --save
```

## Usage

```javascript
const getPrototype = require('get-prototype')
class Test {}
getPrototype(Test) === Test.prototype // true
getPrototype(Test.prototype) === Test.prototype // true
```

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