e 92fdcc4d2a ts hace 1 año
..
.github 92fdcc4d2a ts hace 1 año
test 92fdcc4d2a ts hace 1 año
.eslintrc 92fdcc4d2a ts hace 1 año
CHANGELOG.md 92fdcc4d2a ts hace 1 año
LICENSE 92fdcc4d2a ts hace 1 año
README.md 92fdcc4d2a ts hace 1 año
gOPD.d.ts 92fdcc4d2a ts hace 1 año
gOPD.js 92fdcc4d2a ts hace 1 año
index.d.ts 92fdcc4d2a ts hace 1 año
index.js 92fdcc4d2a ts hace 1 año
package.json 92fdcc4d2a ts hace 1 año
tsconfig.json 92fdcc4d2a ts hace 1 año

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