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

0.1.1 • Public • Published

@ganuz/get-own-property-descriptor

Source Code Version MIT License Bundle Size TypeScript

Get Own Property Descriptor is package from Ganuz library

Install

$ yarn add @ganuz/get-own-property-descriptor

Or

$ npm install --save @ganuz/get-own-property-descriptor

Use

Module

import {
  default as getOwnPropertyDescriptor
} from '@ganuz/get-own-property-descriptor';

Browser

<script src="https://unpkg.com/@ganuz/get-own-property-descriptor/bundle.umd.min.js"></script>
let {
  getOwnPropertyDescriptor
} = G;

Examples

 getOwnPropertyDescriptor(null, 'foo'); // throw TypeError
 getOwnPropertyDescriptor('foo', 0); // throw TypeError
 getOwnPropertyDescriptor({foo: 'bar'}, 'foo'); // => PropertyDescriptor{...}
 getOwnPropertyDescriptor({}, 'foo'); // => undefined
 getOwnPropertyDescriptor(Object.create({foo: 'bar'}), 'foo'); // => undefined

@ganuz/get-own-property-descriptor/polyfill

Module

  import '@ganuz/get-own-property-descriptor/polyfill';

Browser

<script src="https://unpkg.com/@ganuz/get-own-property-descriptor/polyfill/bundle.umd.min.js"></script>

License

Copyright © Yisrael Eliev, Licensed under the MIT license.

Package Sidebar

Install

npm i @ganuz/get-own-property-descriptor

Weekly Downloads

2

Version

0.1.1

License

MIT

Unpacked Size

100 kB

Total Files

27

Last publish

Collaborators

  • yisraelx