gopd
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/gopd package

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i gopd

Weekly Downloads

32,979,852

Version

1.0.1

License

MIT

Unpacked Size

7.7 kB

Total Files

8

Last publish

Collaborators

  • ljharb