</>PackageGraphPackageGraph

es-define-property

npmv1.0.1TypeScript

`Object.defineProperty`, but not IE 8's broken one.

Adopt with care

es-define-property is usable, with caveats. Last published 642 days ago.

  • AAdoption: grade A, Excellent.

    131.3M downloads per week and 4 known dependents.

  • CMaintenance: grade C, Fair — worth a look.

    Last published 642 days ago.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 10.0 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 es-define-property to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

10.0 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

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 es-define-property README.

const assert = require('assert');

const $defineProperty = require('es-define-property');

if ($defineProperty) {
    assert.equal($defineProperty, Object.defineProperty);
} else if (Object.defineProperty) {
    assert.equal($defineProperty, false, 'this is IE 8');
} else {
    assert.equal($defineProperty, false, 'this is an ES3 engine');
}

es-define-property vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
es-define-propertythis page131.3M4MIT1 year ago
define-data-property02MIT1 day ago
hasown08MIT1 day ago
which-boxed-primitive01MIT1 day ago
gopd07MIT1 day ago
es-object-atoms01MIT1 day ago

Dependencies

Declared by es-define-property v1.0.1. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (15)

@ljharb/eslint-config ^21.1.1@ljharb/tsconfig ^0.2.2@types/gopd ^1.0.3@types/tape ^5.6.5auto-changelog ^2.5.0encoding ^0.1.13eslint ^8.8.0evalmd ^0.0.19gopd ^1.2.0in-publish ^2.0.1npmignore ^0.3.1nyc ^10.3.2safe-publish-latest ^2.0.0tape ^5.9.0typescript next

Used by

Popular packages that depend on es-define-property.

Relationship graph

Dependencies (left) and dependents (right) of es-define-property.

call-bindqsget-intrinsicdefine-data-prope…es-define-property
es-define-property dependencies dependents

Frequently installed together

Release history

1 release in the last two years.

Recent versions of es-define-property
VersionPublishedSizeLicense
1.0.1latest1 year ago10.0 KBMIT
1.0.02 years ago12 KBMIT

Overview

es-define-property is an npm package that `Object.defineProperty`, but not IE 8's broken one. It is extremely widely used, with about 131.3M downloads per week and 4 known dependents in the graph. The latest version is 1.0.1, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need `Object.defineProperty`, but not IE 8's broken one and value a battle-tested, widely-adopted 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

  • Large, well-established user base (131.3M weekly downloads).
  • 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

Keywords

Frequently asked questions

Should I use es-define-property?

es-define-property is usable, with caveats. Last published 642 days ago.

How do I install es-define-property?

Run `npm install es-define-property` to add es-define-property to your npm project.

What license is es-define-property released under?

es-define-property is distributed under the MIT license.

How popular is es-define-property?

es-define-property has approximately 131,257,269 downloads per week and 4 known dependent packages.

Is es-define-property still maintained?

The most recent release of es-define-property (v1.0.1) was published 1 year ago.

Does es-define-property run install scripts?

No. es-define-property does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.