Bakhtina Sofya b84cb877be 1st comm | hai 3 semanas | |
---|---|---|
.. | ||
.github | hai 3 semanas | |
test | hai 3 semanas | |
.eslintrc | hai 3 semanas | |
CHANGELOG.md | hai 3 semanas | |
LICENSE | hai 3 semanas | |
README.md | hai 3 semanas | |
index.js | hai 3 semanas | |
package.json | hai 3 semanas |
Object.getOwnPropertyDescriptor
, but accounts for IE's broken implementation.
var gOPD = require('gopd');
var assert = require('assert');
if (gOPD) {
assert.equal(typeof gOPD, 'function', 'descriptors supported');
// use gOPD like Object.getOwnPropertyDescriptor here
} else {
assert.ok(!gOPD, 'descriptors not supported');
}