es-define-property
`Object.defineProperty`, but not IE 8's broken one.
Last updated 10 months 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 (20 days ago)

2 Versions

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

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