@ganuz/has-own-metadata
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

@ganuz/has-own-metadata

Source Code Version MIT License Bundle Size TypeScript

Has Own Metadata is package from Ganuz library

Install

$ yarn add @ganuz/has-own-metadata

Or

$ npm install --save @ganuz/has-own-metadata

Use

Module

import {
  default as hasOwnMetadata
} from '@ganuz/has-own-metadata';

Browser

<script src="https://unpkg.com/@ganuz/has-own-metadata/bundle.umd.min.js"></script>
let {
  hasOwnMetadata
} = G;

Examples

 hasOwnMetadata('key', null, 'prop'); // throw TypeError
 hasOwnMetadata('key', class {}, 'prop'); // => false

 class C{}
 defineMetadata('foo', 'bar', C);
 hasOwnMetadata('foo', C); // => true

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

License

Copyright © Yisrael Eliev, Licensed under the MIT license.

Package Sidebar

Install

npm i @ganuz/has-own-metadata

Weekly Downloads

1

Version

0.1.1

License

MIT

Unpacked Size

129 kB

Total Files

15

Last publish

Collaborators

  • yisraelx