UNPKG

core-js

Version:
12 lines (9 loc) 466 B
'use strict'; var nativePropertyIsEnumerable = {}.propertyIsEnumerable; var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug var NASHORN_BUG = nativeGetOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1); exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) { var descriptor = nativeGetOwnPropertyDescriptor(this, V); return !!descriptor && descriptor.enumerable; } : nativePropertyIsEnumerable;