Muqriz 48f16bfc3e initail first | 4 months ago | |
---|---|---|
.. | ||
.github | 4 months ago | |
test | 4 months ago | |
.eslintrc | 4 months ago | |
CHANGELOG.md | 4 months ago | |
LICENSE | 4 months ago | |
README.md | 4 months ago | |
index.js | 4 months ago | |
package.json | 4 months ago |
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');
}