# @ganuz/has-metadata

> Has Metadata is package from Ganuz library

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

## Install

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

## 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 | 1 |
| Unpacked size | 140.7 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/has-metadata
- 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/has-metadata

## Dependencies (1)

- [@ganuz/get-metadata-owner](https://npm.io/package/@ganuz/get-metadata-owner.md) ^0.1.1

## Recent versions

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

## README

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

**Has Metadata is package from Ganuz library**

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

## Use
**Module**
```typescript
import {
  default as hasMetadata
} from '@ganuz/has-metadata';
```

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

**Examples**
```typescript
 hasMetadata('foo', null); // throw TypeError
 hasMetadata('foo', {}); // => false
 class C{ @Metadata(String, 'cool') [Symbol.for('some')]: string; }
 hasMetadata(String, C.prototype, Symbol.for('some')); // => true
```
```typescript
 class Some{}
 defineMetadata('foo', 'bar', Some);
 hasMetadata('foo', Some); // => true
 class Other extends Some {}
 hasMetadata('foo', Other); // => true
```

*Note: It is based on es6 `WeakMap` and `Map` no need for polyfill (built-in library support).*


## 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/has-metadata · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
