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