1 | ;
|
2 | var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
|
3 | var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
4 |
|
5 | // Nashorn ~ JDK8 bug
|
6 | var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
|
7 |
|
8 | // `Object.prototype.propertyIsEnumerable` method implementation
|
9 | // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
|
10 | exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
11 | var descriptor = getOwnPropertyDescriptor(this, V);
|
12 | return !!descriptor && descriptor.enumerable;
|
13 | } : nativePropertyIsEnumerable;
|