max_liu b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
..
.github b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
test b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
.eslintrc b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
.nycrc b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
CHANGELOG.md b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
LICENSE b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
README.md b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
index.d.ts b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
index.js b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
package.json b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад
tsconfig.json b7ab7c8514 chore: 更新node_modules依赖文件 2 недель назад

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.