max_liu b7ab7c8514 chore: 更新node_modules依赖文件 2 tygodni temu
..
.github b7ab7c8514 chore: 更新node_modules依赖文件 2 tygodni temu
test b7ab7c8514 chore: 更新node_modules依赖文件 2 tygodni temu
.eslintrc b7ab7c8514 chore: 更新node_modules依赖文件 2 tygodni temu
CHANGELOG.md b7ab7c8514 chore: 更新node_modules依赖文件 2 tygodni temu
LICENSE b7ab7c8514 chore: 更新node_modules依赖文件 2 tygodni temu
README.md b7ab7c8514 chore: 更新node_modules依赖文件 2 tygodni temu
gOPD.d.ts b7ab7c8514 chore: 更新node_modules依赖文件 2 tygodni temu
gOPD.js b7ab7c8514 chore: 更新node_modules依赖文件 2 tygodni temu
index.d.ts b7ab7c8514 chore: 更新node_modules依赖文件 2 tygodni temu
index.js b7ab7c8514 chore: 更新node_modules依赖文件 2 tygodni temu
package.json b7ab7c8514 chore: 更新node_modules依赖文件 2 tygodni temu
tsconfig.json b7ab7c8514 chore: 更新node_modules依赖文件 2 tygodni temu

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