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