包详细信息

es-define-property

ljharb221.6mMIT1.0.1

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

javascript, ecmascript, object, define

自述文件

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.

更新日志

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v1.0.1 - 2024-12-06

Commits

  • [types] use shared tsconfig 954a663
  • [actions] split out node 10-20, and 20+ 3a8e84b
  • [Dev Deps] update @ljharb/eslint-config, @ljharb/tsconfig, @types/get-intrinsic, @types/tape, auto-changelog, gopd, tape 86ae27b
  • [Refactor] avoid using get-intrinsic 02480c0
  • [Tests] replace aud with npm audit f6093ff
  • [Tests] configure testling 7139e66
  • [Dev Deps] update tape b901b51
  • [Tests] fix types in tests 469d269
  • [Dev Deps] add missing peer dep 733acfb

v1.0.0 - 2024-02-12

Commits