Package Exports
- property-is-enumerable-x
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (property-is-enumerable-x) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
property-is-enumerable-x
Indicates whether the specified property is enumerable.
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:
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
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