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

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