zheng c04a112d75 webpack il y a 1 jour
..
.github c04a112d75 webpack il y a 1 jour
test c04a112d75 webpack il y a 1 jour
.eslintrc c04a112d75 webpack il y a 1 jour
CHANGELOG.md c04a112d75 webpack il y a 1 jour
LICENSE c04a112d75 webpack il y a 1 jour
README.md c04a112d75 webpack il y a 1 jour
gOPD.d.ts c04a112d75 webpack il y a 1 jour
gOPD.js c04a112d75 webpack il y a 1 jour
index.d.ts c04a112d75 webpack il y a 1 jour
index.js c04a112d75 webpack il y a 1 jour
package.json c04a112d75 webpack il y a 1 jour
tsconfig.json c04a112d75 webpack il y a 1 jour

README.md

gopd Version Badge

github actions coverage License Downloads

npm badge

Object.getOwnPropertyDescriptor, but accounts for IE's broken implementation.

Usage

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');
}