zheng 4ebf6326a2 正则 2 godzin temu
..
.github 4ebf6326a2 正则 2 godzin temu
test 4ebf6326a2 正则 2 godzin temu
.eslintrc 4ebf6326a2 正则 2 godzin temu
CHANGELOG.md 4ebf6326a2 正则 2 godzin temu
LICENSE 4ebf6326a2 正则 2 godzin temu
README.md 4ebf6326a2 正则 2 godzin temu
gOPD.d.ts 4ebf6326a2 正则 2 godzin temu
gOPD.js 4ebf6326a2 正则 2 godzin temu
index.d.ts 4ebf6326a2 正则 2 godzin temu
index.js 4ebf6326a2 正则 2 godzin temu
package.json 4ebf6326a2 正则 2 godzin temu
tsconfig.json 4ebf6326a2 正则 2 godzin temu

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