0.1.1 • Published 5 years ago

@ganuz/get-own-property-descriptor v0.1.1

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

@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.