zkt26/node_modules/gopd
2026-03-22 12:47:16 +01:00
..
.github final without readme 2026-03-22 12:47:16 +01:00
test final without readme 2026-03-22 12:47:16 +01:00
.eslintrc final without readme 2026-03-22 12:47:16 +01:00
CHANGELOG.md final without readme 2026-03-22 12:47:16 +01:00
gOPD.d.ts final without readme 2026-03-22 12:47:16 +01:00
gOPD.js final without readme 2026-03-22 12:47:16 +01:00
index.d.ts final without readme 2026-03-22 12:47:16 +01:00
index.js final without readme 2026-03-22 12:47:16 +01:00
LICENSE final without readme 2026-03-22 12:47:16 +01:00
package.json final without readme 2026-03-22 12:47:16 +01:00
README.md final without readme 2026-03-22 12:47:16 +01:00
tsconfig.json final without readme 2026-03-22 12:47:16 +01:00

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