# @ganuz/get-metadata-owner

> Get Metadata Owner is package from Ganuz library

Latest version **0.1.1** (published 2019-04-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @ganuz/get-metadata-owner
pnpm add @ganuz/get-metadata-owner
yarn add @ganuz/get-metadata-owner
bun add @ganuz/get-metadata-owner
```

## Health

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

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2019-04-16 |
| First published | 2019-04-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 140.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Yisrael Eliev |
| Maintainers | yisraelx |
| Keywords | metadata, modular, modules, reflect, utilities, utils |

## Links

- npm: https://www.npmjs.com/package/@ganuz/get-metadata-owner
- Repository: https://github.com/yisraelx/ganuz
- Homepage: https://github.com/yisraelx/ganuz#readme
- Issues: https://github.com/yisraelx/ganuz/issues
- npm.io page: https://npm.io/package/@ganuz/get-metadata-owner

## Dependencies (2)

- [@ganuz/has-own-metadata](https://npm.io/package/@ganuz/has-own-metadata.md) ^0.1.1
- [@ganuz/find-prototype-of](https://npm.io/package/@ganuz/find-prototype-of.md) ^0.1.1

## Recent versions

- 0.1.1 (latest) — 2019-04-16
- 0.1.0 — 2019-04-02

## README

# @ganuz/get-metadata-owner
[![Source Code](https://img.shields.io/badge/%3C%2F%3E-source_code-blue.svg)](https://github.com/yisraelx/ganuz/blob/master/modules/get-metadata-owner)
[![Version](https://img.shields.io/npm/v/@ganuz/get-metadata-owner.svg)](https://www.npmjs.com/package/@ganuz/get-metadata-owner)
[![MIT License](https://img.shields.io/npm/l/@ganuz/get-metadata-owner.svg?color=yellow)](https://github.com/yisraelx/ganuz/blob/master/LICENSE)
[![Bundle Size](https://img.shields.io/bundlephobia/min/@ganuz/get-metadata-owner.svg?color=green)](https://bundlephobia.com/result?p=@ganuz/get-metadata-owner)
[![TypeScript](https://img.shields.io/badge/100%25-TypeScript-blue.svg)](https://www.typescriptlang.org)

**Get Metadata Owner is package from Ganuz library**

## Install
```sh
$ yarn add @ganuz/get-metadata-owner
```
Or
```sh
$ npm install --save @ganuz/get-metadata-owner
```

## Use
**Module**
```typescript
import {
  default as getMetadataOwner
} from '@ganuz/get-metadata-owner';
```

**Browser**
```html
<script src="https://unpkg.com/@ganuz/get-metadata-owner/bundle.umd.min.js"></script>
```
```typescript
let {
  getMetadataOwner
} = G;
```

**Examples**
```typescript
 getMetadataOwner('foo', NaN, 'prop'); // throw TypeError
 getMetadataOwner('foo', {}); // => null
 getMetadataOwner('foo', class {}, 'prop'); // => null
```
```typescript
 class A {}
 class B extends A {}
 class C extends B {}

 defineMetadata('a', 1, A);
 defineMetadata('b', 2, B);
 defineMetadata('c', 3, C);

 getMetadataOwner('a', C); // => A
 getMetadataOwner('b', A); // => null
 getMetadataOwner('b', B); // => B

 defineMetadata('color', 'red', A);
 defineMetadata('color', 'blue', C);

 getMetadataOwner('color', A); // => A
 getMetadataOwner('color', B); // => A
 getMetadataOwner('color', C); // => C

 defineMetadata('foo', 'bar', B);

 getMetadataOwner('foo', A); // => null
 getMetadataOwner('foo', B); // => B
 getMetadataOwner('foo', C); // => B
```


## License
Copyright © [Yisrael Eliev](https://github.com/yisraelx),
Licensed under the [MIT license](https://github.com/yisraelx/ganuz/blob/master/LICENSE).

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