es-define-property
`Object.defineProperty`, but not IE 8's broken one.
Last updated 8 months ago by ljharb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm 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.0                                ...           latest (8 months ago)

1 Versions

  • 1.0.0                                ...           8 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (15)

Copyright 2013 - present © cnpmjs.org | Home |