tree: c8d2ec66d3c020680e3a3323bca3a3b507ee40da [path history] [tgz]
  1. .github/
  2. test/
  3. .eslintrc
  4. CHANGELOG.md
  5. gOPD.d.ts
  6. gOPD.js
  7. index.d.ts
  8. index.js
  9. LICENSE
  10. package.json
  11. README.md
  12. tsconfig.json
node_modules/gopd/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');
}