odin-js-fundamentals-part-4/node_modules/gopd
NetMan 65754e6d19 Ran npm install for whole directory 2024-01-05 20:30:21 +01:00
..
.github Ran npm install for whole directory 2024-01-05 20:30:21 +01:00
test Ran npm install for whole directory 2024-01-05 20:30:21 +01:00
.eslintrc Ran npm install for whole directory 2024-01-05 20:30:21 +01:00
CHANGELOG.md Ran npm install for whole directory 2024-01-05 20:30:21 +01:00
LICENSE Ran npm install for whole directory 2024-01-05 20:30:21 +01:00
README.md Ran npm install for whole directory 2024-01-05 20:30:21 +01:00
index.js Ran npm install for whole directory 2024-01-05 20:30:21 +01:00
package.json Ran npm install for whole directory 2024-01-05 20:30:21 +01: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');
}