forked from dachan/dach
1
0
Fork 0
dach/node_modules/gopd
leca 30228b54ae a lot of changes 2023-10-22 22:39:45 +03:00
..
.github a lot of changes 2023-10-22 22:39:45 +03:00
test a lot of changes 2023-10-22 22:39:45 +03:00
.eslintrc a lot of changes 2023-10-22 22:39:45 +03:00
CHANGELOG.md a lot of changes 2023-10-22 22:39:45 +03:00
LICENSE a lot of changes 2023-10-22 22:39:45 +03:00
README.md a lot of changes 2023-10-22 22:39:45 +03:00
index.js a lot of changes 2023-10-22 22:39:45 +03:00
package.json a lot of changes 2023-10-22 22:39:45 +03:00

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