zlwu dd667101ef first commit 1 سال پیش
..
.github dd667101ef first commit 1 سال پیش
test dd667101ef first commit 1 سال پیش
.eslintrc dd667101ef first commit 1 سال پیش
CHANGELOG.md dd667101ef first commit 1 سال پیش
LICENSE dd667101ef first commit 1 سال پیش
README.md dd667101ef first commit 1 سال پیش
gOPD.d.ts dd667101ef first commit 1 سال پیش
gOPD.js dd667101ef first commit 1 سال پیش
index.d.ts dd667101ef first commit 1 سال پیش
index.js dd667101ef first commit 1 سال پیش
package.json dd667101ef first commit 1 سال پیش
tsconfig.json dd667101ef first commit 1 سال پیش

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