@ganuz/get-own-property-descriptor
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.