max_liu b7ab7c8514 chore: 更新node_modules依赖文件 před 2 týdny
..
.github b7ab7c8514 chore: 更新node_modules依赖文件 před 2 týdny
test b7ab7c8514 chore: 更新node_modules依赖文件 před 2 týdny
.eslintrc b7ab7c8514 chore: 更新node_modules依赖文件 před 2 týdny
CHANGELOG.md b7ab7c8514 chore: 更新node_modules依赖文件 před 2 týdny
LICENSE b7ab7c8514 chore: 更新node_modules依赖文件 před 2 týdny
README.md b7ab7c8514 chore: 更新node_modules依赖文件 před 2 týdny
gOPD.d.ts b7ab7c8514 chore: 更新node_modules依赖文件 před 2 týdny
gOPD.js b7ab7c8514 chore: 更新node_modules依赖文件 před 2 týdny
index.d.ts b7ab7c8514 chore: 更新node_modules依赖文件 před 2 týdny
index.js b7ab7c8514 chore: 更新node_modules依赖文件 před 2 týdny
package.json b7ab7c8514 chore: 更新node_modules依赖文件 před 2 týdny
tsconfig.json b7ab7c8514 chore: 更新node_modules依赖文件 před 2 týdny

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');
}