caoge c760052ff9 机车状态修改 | hai 8 meses | |
---|---|---|
.. | ||
.github | hai 8 meses | |
test | hai 8 meses | |
.eslintrc | hai 8 meses | |
CHANGELOG.md | hai 8 meses | |
LICENSE | hai 8 meses | |
README.md | hai 8 meses | |
index.js | hai 8 meses | |
package.json | hai 8 meses |
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');
}