Bakhtina Sofya b84cb877be 1st comm | hai 2 semanas | |
---|---|---|
.. | ||
.github | hai 2 semanas | |
test | hai 2 semanas | |
.eslintrc | hai 2 semanas | |
CHANGELOG.md | hai 2 semanas | |
LICENSE | hai 2 semanas | |
README.md | hai 2 semanas | |
index.js | hai 2 semanas | |
package.json | hai 2 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');
}