vmk-demo-bot / admin / node_modules / gopd /
..
.github init 17 days ago
test init 17 days ago
.eslintrc init 17 days ago
CHANGELOG.md init 17 days ago
LICENSE init 17 days ago
README.md init 17 days ago
gOPD.d.ts init 17 days ago
gOPD.js init 17 days ago
index.d.ts init 17 days ago
index.js init 17 days ago
package.json init 17 days ago
tsconfig.json init 17 days ago
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');
}