Bakhtina Sofya b84cb877be 1st comm | 3 nedēļas atpakaļ | |
---|---|---|
.. | ||
.github | 3 nedēļas atpakaļ | |
test | 3 nedēļas atpakaļ | |
.eslintrc | 3 nedēļas atpakaļ | |
CHANGELOG.md | 3 nedēļas atpakaļ | |
LICENSE | 3 nedēļas atpakaļ | |
README.md | 3 nedēļas atpakaļ | |
index.js | 3 nedēļas atpakaļ | |
package.json | 3 nedēļas atpakaļ |
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');
}