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