es-define-property (1.0.1)

Published 2026-02-24 13:56:00 +00:00 by atheaadmin

Installation

registry=
npm install es-define-property@1.0.1
"es-define-property": "1.0.1"

About this package

es-define-property Version Badge

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.

Dependencies

Development Dependencies

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

Keywords

javascript ecmascript object define property defineProperty Object.defineProperty
Details
npm
2026-02-24 13:56:00 +00:00
0
Jordan Harband
MIT
latest
4.3 KiB
Assets (1)
Versions (1) View all
1.0.1 2026-02-24