冯博深 e3294c98a1 first 21 órája
..
.github e3294c98a1 first 21 órája
test e3294c98a1 first 21 órája
.eslintrc e3294c98a1 first 21 órája
.nycrc e3294c98a1 first 21 órája
CHANGELOG.md e3294c98a1 first 21 órája
LICENSE e3294c98a1 first 21 órája
README.md e3294c98a1 first 21 órája
index.d.ts e3294c98a1 first 21 órája
index.js e3294c98a1 first 21 órája
package.json e3294c98a1 first 21 órája
tsconfig.json e3294c98a1 first 21 órája

README.md

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.