zheng 3cabbb3159 webpack hace 19 horas
..
.github 3cabbb3159 webpack hace 19 horas
test 3cabbb3159 webpack hace 19 horas
.eslintrc 3cabbb3159 webpack hace 19 horas
CHANGELOG.md 3cabbb3159 webpack hace 19 horas
LICENSE 3cabbb3159 webpack hace 19 horas
README.md 3cabbb3159 webpack hace 19 horas
gOPD.d.ts 3cabbb3159 webpack hace 19 horas
gOPD.js 3cabbb3159 webpack hace 19 horas
index.d.ts 3cabbb3159 webpack hace 19 horas
index.js 3cabbb3159 webpack hace 19 horas
package.json 3cabbb3159 webpack hace 19 horas
tsconfig.json 3cabbb3159 webpack hace 19 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');
}