Indicates whether the specified property is enumerable.
npm install property-is-enumerable-x href="https://travis-ci.org/Xotic750/property-is-enumerable-x"
title="Travis status"> src="https://travis-ci.org/Xotic750/property-is-enumerable-x.svg?branch=master"
alt="Travis status" height="18">
href="https://david-dm.org/Xotic750/property-is-enumerable-x"
title="Dependency status"> alt="Dependency status" height="18"/>
href="https://david-dm.org/Xotic750/property-is-enumerable-x?type=dev"
title="devDependency status"> alt="devDependency status" height="18"/>
href="https://badge.fury.io/js/property-is-enumerable-x"
title="npm version"> alt="npm version" height="18">
href="https://www.jsdelivr.com/package/npm/property-is-enumerable-x"
title="jsDelivr hits"> alt="jsDelivr hits" height="18">
href="https://bettercodehub.com/results/Xotic750/property-is-enumerable-x"
title="bettercodehub score"> alt="bettercodehub score" height="18">
href="https://coveralls.io/github/Xotic750/property-is-enumerable-x?branch=master"
title="Coverage Status"> alt="Coverage Status" height="18">
Indicates whether the specified property is enumerable.
This method returns a Boolean indicating whether the specified property is
enumerable. Does not attempt to fix bugs in IE<9 or old Opera, otherwise it
does ES6ify the method.
Kind: Exported function
Returns: boolean - A Boolean indicating whether the specified property is
enumerable.
Throws:
- TypeError If target is null or undefined.
| Param | Type | Description |
| -------- | ------------------------------------------ | ----------------------------------------- |
| object | Object | The object on which to test the property. |
| property | string \| Symbol | The name of the property to test. |
Example
``js
import propertyIsEnumerable from 'property-is-enumerable-x';
const o = {};
const a = [];
o.prop = 'is enumerable';
a[0] = 'is enumerable';
console.log(propertyIsEnumerable(o, 'prop')); // true
console.log(propertyIsEnumerable(a, 0)); // true
``