Mohammad Asif cf937194cb Removed un-waned things 1. 6 bulan lalu
..
.github cf937194cb Removed un-waned things 1. 6 bulan lalu
test cf937194cb Removed un-waned things 1. 6 bulan lalu
.eslintrc cf937194cb Removed un-waned things 1. 6 bulan lalu
CHANGELOG.md cf937194cb Removed un-waned things 1. 6 bulan lalu
LICENSE cf937194cb Removed un-waned things 1. 6 bulan lalu
README.md cf937194cb Removed un-waned things 1. 6 bulan lalu
index.js cf937194cb Removed un-waned things 1. 6 bulan lalu
package.json cf937194cb Removed un-waned things 1. 6 bulan lalu

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