@ganuz/get-own-property-descriptors
v0.1.1
Published
Get Own Property Descriptors is package from Ganuz library
Downloads
5
Maintainers
Readme
@ganuz/get-own-property-descriptors
Get Own Property Descriptors is package from Ganuz library
Install
$ yarn add @ganuz/get-own-property-descriptors
Or
$ npm install --save @ganuz/get-own-property-descriptors
Use
Module
import {
default as getOwnPropertyDescriptors
} from '@ganuz/get-own-property-descriptors';
Browser
<script src="https://unpkg.com/@ganuz/get-own-property-descriptors/bundle.umd.min.js"></script>
let {
getOwnPropertyDescriptors
} = G;
Examples
getOwnPropertyDescriptors(null); // throw TypeError
getOwnPropertyDescriptors({}); // => {}
getOwnPropertyDescriptors([1]); // => {0: Descriptor{…}, length: Descriptor{…}}
getOwnPropertyDescriptors({Symbol('foo'): 'bar', some(){}, get color(){}}); // => {Symbol('foo'): Descriptor{…}, some: Descriptor{…}, color: Descriptor{…}}
getOwnPropertyDescriptors(Object.create({foo: 'bar'}, {color: {value: 'blue', enumerable: false}})); // => {color: Descriptor{…}}
License
Copyright © Yisrael Eliev, Licensed under the MIT license.