urltomarkdown/node_modules/gopd
Lee Hanken d40eb12fa6 include generated API docs 2024-04-22 13:29:49 +01:00
..
.github include generated API docs 2024-04-22 13:29:49 +01:00
test include generated API docs 2024-04-22 13:29:49 +01:00
.eslintrc include generated API docs 2024-04-22 13:29:49 +01:00
CHANGELOG.md include generated API docs 2024-04-22 13:29:49 +01:00
LICENSE include generated API docs 2024-04-22 13:29:49 +01:00
README.md include generated API docs 2024-04-22 13:29:49 +01:00
index.js include generated API docs 2024-04-22 13:29:49 +01:00
package.json include generated API docs 2024-04-22 13:29:49 +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');
}