AJNB 376d9cfaf8 hjj | 2 months ago | |
---|---|---|
.. | ||
.github | 2 months ago | |
test | 2 months ago | |
.eslintrc | 2 months ago | |
CHANGELOG.md | 2 months ago | |
LICENSE | 2 months ago | |
README.md | 2 months ago | |
index.js | 2 months ago | |
package.json | 2 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');
}