property-is-enumerable-x
Indicates whether the specified property is enumerable.
Version: 1.1.0
Author: Xotic750 Xotic750@gmail.com
License: MIT
Copyright: Xotic750
module.exports(object, property) ⇒ boolean ⏏
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:
TypeErrorIf 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
var propertyIsEnumerable = require('property-is-enumerable-x');
var o = {};
var a = [];
o.prop = 'is enumerable';
a[0] = 'is enumerable';
propertyIsEnumerable(o, 'prop'); // true
propertyIsEnumerable(a, 0); // true