gopd
npmv1.2.0TypeScript`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.
Adopt with care
gopd is usable, with caveats. Last published 644 days ago. 2 releases in the last 2 years.
- ?Adoption: grade ?, Not reported by this registry.
No download data reported for this package yet.
- CMaintenance: grade C, Fair — worth a look.
Last published 644 days ago. 2 releases in the last 2 years.
- AWeight: grade A, Excellent.
Zero runtime dependencies, about 9.6 KB installed.
- BSupply chain: grade B, Good.
This package has a single maintainer (bus factor of 1).
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding gopd to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Compatibility
- Node.js
- node >= 0.4
- Module format
- CommonJS only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the gopd README.
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');
}gopd vs the alternatives
Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.
| Package | Weekly downloads | Dependents | License | Last release |
|---|---|---|---|---|
| gopdthis page | 0 | 7 | MIT | 1 year ago |
| es-define-property | 131.3M | 4 | MIT | 1 day ago |
| hasown | 0 | 8 | MIT | 1 day ago |
| define-data-property | 0 | 2 | MIT | 1 day ago |
| eslint | 138.4M | 279 | MIT | 1 day ago |
| call-bind | 80.7M | 5 | MIT | 1 day ago |
Dependencies
Declared by gopd v1.2.0. Runtime dependencies are installed with the package; dev dependencies are not.
Dev (13)
Used by
Popular packages that depend on gopd.
`Object.defineProperty`, but not IE 8's broken one.
Is this value a JS regex? Works cross-realm/iframe, and despite ES6 @@toStringTag
Get and robustly cache all JS language-level intrinsics at first require time
Set a function's length property
Define a data property on an object. Will fall back to assignment in an engine without descriptors.
ES6 spec-compliant RegExp.prototype.flags shim.
Robust call-bound JavaScript intrinsics, using `call-bind` and `get-intrinsic`.
Relationship graph
Dependencies (left) and dependents (right) of gopd.
Frequently installed together
An AST-based pattern checker for JavaScript.
string representations of objects in node and the browser
A robust, ES3 compatible, "has own property" predicate.
A simple cache for a few of the JS Error constructors.
`Object.defineProperty`, but not IE 8's broken one.
Robustly `.call.bind()` a function
Implementation of Function.prototype.bind
Robust call-bound JavaScript intrinsics, using `call-bind` and `get-intrinsic`.
Get and robustly cache all JS language-level intrinsics at first require time
Helper functions around Function call/apply/bind, for use in `call-bind`
ES Math-related intrinsics and helpers, robustly cached.
Set a function's name property
Release history
1 release in the last two years, typically about 759 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 1.2.0latest | 1 year ago | 9.6 KB | MIT |
| 1.1.0 | 1 year ago | 9.4 KB | MIT |
| 1.0.1 | 3 years ago | 7.5 KB | MIT |
Overview
gopd is an npm package that `Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation. It has 7 known dependents in the graph. The latest version is 1.2.0, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need `Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Maintainers
Funding
Frequently asked questions
Should I use gopd?
gopd is usable, with caveats. Last published 644 days ago. 2 releases in the last 2 years.
How do I install gopd?
Run `npm install gopd` to add gopd to your npm project.
What license is gopd released under?
gopd is distributed under the MIT license.
How popular is gopd?
npm does not publish download counts. Within PackageGraph's crawl, 7 known packages depend on gopd.
Is gopd still maintained?
The most recent release of gopd (v1.2.0) was published 1 year ago.
Does gopd run install scripts?
No. gopd does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.