0.1.1 • Published 6 years ago

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

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

@ganuz/get-own-property-descriptors

Source Code Version MIT License Bundle Size TypeScript

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.