|
|
il y a 4 mois | |
|---|---|---|
| .. | ||
| .github | il y a 4 mois | |
| test | il y a 4 mois | |
| .eslintrc | il y a 4 mois | |
| CHANGELOG.md | il y a 4 mois | |
| LICENSE | il y a 4 mois | |
| README.md | il y a 4 mois | |
| gOPD.d.ts | il y a 4 mois | |
| gOPD.js | il y a 4 mois | |
| index.d.ts | il y a 4 mois | |
| index.js | il y a 4 mois | |
| package.json | il y a 4 mois | |
| tsconfig.json | il y a 4 mois | |
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');
}