NPM Smell 🍑💨

trivial and outdated NPM packages

define-property outdated npm logo

Reimplements the native Object.defineProperty() method.

Weekly Downloads
56,950,430
Dependencies
8 (6 distinct)
Latest Release
7 years ago
This dependency re-creates a native JavaScript API. It is recommended to use the native API instead
Outdated
natively supported
since 11 years (chrome, firefox, safari, nodejs)

Dependency Tree

define-property
  is-descriptor
    is-accessor-descriptor
      hasown
        function-bind
    is-data-descriptor
      hasown
        function-bind
  isobject

About

This dependency reimplents the native Object.defineProperty() method. It is supported by all modern browsers and Node.js versions since about 6 years.

// Define a non-enumerable property on an object
const obj = {};
Object.defineProperty(obj, "foo", {
    value: "bar",
    enumerable: false
});

console.log(obj.foo); // "bar"
console.log(Object.keys(obj)); // []

Additionally it needs 7 additional dependencies to do what Object.defineProperty can do natively.