837390164@qq.com a303233a09 提交更新 4 months ago
..
.github a303233a09 提交更新 4 months ago
test a303233a09 提交更新 4 months ago
.eslintrc a303233a09 提交更新 4 months ago
CHANGELOG.md a303233a09 提交更新 4 months ago
LICENSE a303233a09 提交更新 4 months ago
README.md a303233a09 提交更新 4 months ago
gOPD.d.ts a303233a09 提交更新 4 months ago
gOPD.js a303233a09 提交更新 4 months ago
index.d.ts a303233a09 提交更新 4 months ago
index.js a303233a09 提交更新 4 months ago
package.json a303233a09 提交更新 4 months ago
tsconfig.json a303233a09 提交更新 4 months 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');
}