zheng f326829555 仓库 il y a 1 semaine
..
.github f326829555 仓库 il y a 1 semaine
test f326829555 仓库 il y a 1 semaine
.eslintrc f326829555 仓库 il y a 1 semaine
CHANGELOG.md f326829555 仓库 il y a 1 semaine
LICENSE f326829555 仓库 il y a 1 semaine
README.md f326829555 仓库 il y a 1 semaine
gOPD.d.ts f326829555 仓库 il y a 1 semaine
gOPD.js f326829555 仓库 il y a 1 semaine
index.d.ts f326829555 仓库 il y a 1 semaine
index.js f326829555 仓库 il y a 1 semaine
package.json f326829555 仓库 il y a 1 semaine
tsconfig.json f326829555 仓库 il y a 1 semaine

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