gopd
`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.
Last updated a month ago by ljharb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install gopd 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.2.0                                ...           latest (22 days ago)

3 Versions

  • 1.2.0                                ...           22 days ago
  • 1.1.0                                ...           a month ago
  • 1.0.1                                ...           2 years ago

© 2010 - cnpmjs.org x YWFE | Home | YWFE