es-define-property <sup>Version Badge</sup>

github actions coverage License Downloads

npm badge

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

Example

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

Tests

Simply clone the repo, npm install, and run npm test

Security

Please email @ljharb or see https://tidelift.com/security if you have a potential security vulnerability to report.

es-define-property - Installation

To install es-define-property via this registry, you'll need to install via the --registry parameter with your package manager.

n

NPM

npm install es-define-property --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Yarn

yarn config set registry https://js.registry.sudovanilla.org
yarn install es-define-property

Learn more about the config option.

PNPM

pnpm install es-define-property --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Bun Logo

Bun

bun install es-define-property --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Learn more about setting this up in your bunfig.toml configuration.


For Deno, add the following to your .npmrc file in your directory:

registry="https://js.registry.sudovanilla.org"

Then run the deno install command.

es-define-property - Download

Download Tarball (v1.0.1)

Integrity sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==
SHASUM 983eb2f9a6724e9303f61addf011c72e09e0b0fa
Tarball https://js.registry.sudovanilla.org/es-define-property/-/es-define-property-1.0.1.tgz