gushoubang 3d8e66ac9f 更改脚本 il y a 1 an
..
.github 3d8e66ac9f 更改脚本 il y a 1 an
test 3d8e66ac9f 更改脚本 il y a 1 an
.eslintrc 3d8e66ac9f 更改脚本 il y a 1 an
CHANGELOG.md 3d8e66ac9f 更改脚本 il y a 1 an
LICENSE 3d8e66ac9f 更改脚本 il y a 1 an
README.md 3d8e66ac9f 更改脚本 il y a 1 an
index.js 3d8e66ac9f 更改脚本 il y a 1 an
package.json 3d8e66ac9f 更改脚本 il y a 1 an

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