nitowa 1dae68b1c7 init | 1 rok temu | |
---|---|---|
.. | ||
.github | 1 rok temu | |
test | 1 rok temu | |
.eslintrc | 1 rok temu | |
CHANGELOG.md | 1 rok temu | |
LICENSE | 1 rok temu | |
README.md | 1 rok temu | |
index.js | 1 rok temu | |
package.json | 1 rok temu |
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');
}