es-define-property
`Object.defineProperty`, but not IE 8's broken one.
Last updated 19 days ago by ljharb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install es-define-property 
SYNC missed versions from official npm registry.

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.

Current Tags

  • 1.0.1                                ...           latest (19 days ago)

2 Versions

  • 1.0.1                                ...           19 days ago
  • 1.0.0                                ...           10 months ago
Maintainers (1)
Downloads
Total 3
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (15)

© 2010 - cnpmjs.org x YWFE | Home | YWFE