Skip to content
/ gopd Public

`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.

License

Notifications You must be signed in to change notification settings

ljharb/gopd

Repository files navigation

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

About

`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks