AR/node_modules/gopd
omar salah 22f2a26274 init 2024-06-14 01:11:06 +03:00
..
.github init 2024-06-14 01:11:06 +03:00
test init 2024-06-14 01:11:06 +03:00
.eslintrc init 2024-06-14 01:11:06 +03:00
CHANGELOG.md init 2024-06-14 01:11:06 +03:00
LICENSE init 2024-06-14 01:11:06 +03:00
README.md init 2024-06-14 01:11:06 +03:00
index.js init 2024-06-14 01:11:06 +03:00
package.json init 2024-06-14 01:11:06 +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');
}