bifocal/node_modules/gopd
Jean Viscogliosi-Pate f8836547f1 Broken socials 2024-06-19 06:56:58 -07:00
..
.github Broken socials 2024-06-19 06:56:58 -07:00
test Broken socials 2024-06-19 06:56:58 -07:00
.eslintrc Broken socials 2024-06-19 06:56:58 -07:00
CHANGELOG.md Broken socials 2024-06-19 06:56:58 -07:00
LICENSE Broken socials 2024-06-19 06:56:58 -07:00
README.md Broken socials 2024-06-19 06:56:58 -07:00
index.js Broken socials 2024-06-19 06:56:58 -07:00
package.json Broken socials 2024-06-19 06:56:58 -07: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');
}