</>PackageGraphPackageGraph

define-data-property

npmv1.1.4TypeScript

Define a data property on an object. Will fall back to assignment in an engine without descriptors.

Adopt with care

define-data-property is usable, with caveats. Last published 939 days ago.

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • DMaintenance: grade D, Poor — a real concern.

    Last published 939 days ago.

  • AWeight: grade A, Excellent.

    Pulls in 3 transitive packages, about 62 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 define-data-property to a project.

3
Direct dependencies

Runtime packages this one declares itself.

3
Total installed

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

62 KB
Install size

Unpacked size of this package plus its entire runtime tree.

1
Tree depth

Longest resolved dependency chain below this package.

Licenses in the dependency tree

MIT

Every license you inherit by installing define-data-property, not just its own. Check this before a legal review, not after.

Compatibility

Node.js
node >= 0.4
Module format
CommonJS only
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the define-data-property README.

javascriptFull README ↗
var defineDataProperty = require('define-data-property');
var assert = require('assert');

var obj = {};
defineDataProperty(obj, 'key', 'value');
defineDataProperty(
	obj,
	'key2',
	'value',
	true, // nonEnumerable, optional
	false, // nonWritable, optional
	true, // nonConfigurable, optional
	false // loose, optional
);
Example truncated — see the full README.

define-data-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
define-data-propertythis page02MIT2 years ago
es-define-property131.3M4MIT1 day ago
which-boxed-primitive01MIT1 day ago
es-object-atoms01MIT1 day ago
gopd07MIT1 day ago
hasown08MIT1 day ago

Dependencies

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

Dev (27)

@ljharb/eslint-config ^21.1.0@types/call-bind ^1.0.5@types/define-properties ^1.1.5@types/es-value-fixtures ^1.4.4@types/for-each ^0.3.3@types/get-intrinsic ^1.2.2@types/gopd ^1.0.3@types/has-property-descriptors ^1.0.3@types/object-inspect ^1.8.4@types/object.getownpropertydescriptors ^2.1.4@types/tape ^5.6.4aud ^2.0.4auto-changelog ^2.4.0es-value-fixtures ^1.4.2eslint =8.8.0evalmd ^0.0.19for-each ^0.3.3hasown ^2.0.1in-publish ^2.0.1npmignore ^0.3.1nyc ^10.3.2object-inspect ^1.13.1object.getownpropertydescriptors ^2.1.7reflect.ownkeys ^1.1.4safe-publish-latest ^2.0.0tape ^5.7.4typescript next

Used by

Popular packages that depend on define-data-property.

Relationship graph

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

Frequently installed together

Release history

No releases in the last two years, typically about 7 days apart.

Recent versions of define-data-property
VersionPublishedSizeLicense
1.1.4latest2 years ago30 KBMIT
1.1.32 years ago30 KBMIT
1.1.22 years ago30 KBMIT
1.1.12 years ago29 KBMIT
1.1.03 years ago39 KBMIT
1.0.13 years ago37 KBMIT
1.0.03 years ago23 KBMIT

Overview

define-data-property is an npm package that define a data property on an object. Will fall back to assignment in an engine without descriptors. It has 2 known dependents in the graph. The latest version is 1.1.4, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need define a data property on an object. Will fall back to assignment in an engine without descriptors and value a focused solution.

When not to use it

Consider an alternative if you need to minimize your dependency tree, or if a more actively-maintained option better fits your npm stack.

Pros

  • Ships TypeScript type definitions.
  • Clear open-source license (MIT).

Cons

  • Large dependency tree (30 direct dependencies) increases install size and audit surface.

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Funding

Frequently asked questions

Should I use define-data-property?

define-data-property is usable, with caveats. Last published 939 days ago.

How do I install define-data-property?

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

How many dependencies does define-data-property have?

define-data-property declares 30 direct dependencies and pulls in 3 packages in total once its runtime tree is resolved totalling about 62 KB on disk.

What license is define-data-property released under?

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

How popular is define-data-property?

npm does not publish download counts. Within PackageGraph's crawl, 2 known packages depend on define-data-property.

Is define-data-property still maintained?

The most recent release of define-data-property (v1.1.4) was published 2 years ago.

Does define-data-property run install scripts?

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