heyifan 16c7719d8b 修改 il y a 2 mois
..
.github 16c7719d8b 修改 il y a 2 mois
test 16c7719d8b 修改 il y a 2 mois
.eslintrc 16c7719d8b 修改 il y a 2 mois
CHANGELOG.md 16c7719d8b 修改 il y a 2 mois
LICENSE 16c7719d8b 修改 il y a 2 mois
README.md 16c7719d8b 修改 il y a 2 mois
gOPD.d.ts 16c7719d8b 修改 il y a 2 mois
gOPD.js 16c7719d8b 修改 il y a 2 mois
index.d.ts 16c7719d8b 修改 il y a 2 mois
index.js 16c7719d8b 修改 il y a 2 mois
package.json 16c7719d8b 修改 il y a 2 mois
tsconfig.json 16c7719d8b 修改 il y a 2 mois

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