4.1.2 • Published 5 years ago

object-get-own-property-descriptor-x v4.1.2

Weekly downloads
11,792
License
MIT
Repository
github
Last release
5 years ago

object-get-own-property-descriptor-x

Sham for ES6 Object.getOwnPropertyDescriptor

module.exportsObject

This method returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object.

Kind: Exported member
Returns: Object - A property descriptor of the given property if it exists on the object, undefined otherwise.

ParamTypeDescription
object*The object in which to look for the property.
property*The name of the property whose description is to be retrieved.

Example

import getOwnPropertyDescriptor from 'object-get-own-property-descriptor-x';
const obj = {bar: 42};
console.log(getOwnPropertyDescriptor(o, 'bar'));
// {
//   configurable: true,
//   enumerable: true,
//   value: 42,
//   writable: true
// }
4.1.2

5 years ago

4.1.1

5 years ago

4.1.0

5 years ago

4.0.19

5 years ago

4.0.18

5 years ago

4.0.17

5 years ago

4.0.16

5 years ago

4.0.15

5 years ago

4.0.14

5 years ago

4.0.13

5 years ago

4.0.12

5 years ago

4.0.11

5 years ago

4.0.10

5 years ago

4.0.9

5 years ago

4.0.8

5 years ago

4.0.7

5 years ago

4.0.6

5 years ago

4.0.5

5 years ago

4.0.4

5 years ago

4.0.3

5 years ago

4.0.2

5 years ago

4.0.1

5 years ago

4.0.0

5 years ago

3.2.0

7 years ago

3.1.0

7 years ago

3.0.0

7 years ago

2.0.0

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago