mirror of
https://github.com/musix-org/musix-oss
synced 2024-12-24 01:43:18 +00:00
14 lines
590 B
JavaScript
14 lines
590 B
JavaScript
|
'use strict';
|
||
|
var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
|
||
|
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
||
|
|
||
|
// Nashorn ~ JDK8 bug
|
||
|
var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({ 1: 2 }, 1);
|
||
|
|
||
|
// `Object.prototype.propertyIsEnumerable` method implementation
|
||
|
// https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
|
||
|
exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
||
|
var descriptor = getOwnPropertyDescriptor(this, V);
|
||
|
return !!descriptor && descriptor.enumerable;
|
||
|
} : nativePropertyIsEnumerable;
|