[d565449] | 1 | # has-property-descriptors <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
---|
| 2 |
|
---|
| 3 | [![github actions][actions-image]][actions-url]
|
---|
| 4 | [![coverage][codecov-image]][codecov-url]
|
---|
| 5 | [![dependency status][deps-svg]][deps-url]
|
---|
| 6 | [![dev dependency status][dev-deps-svg]][dev-deps-url]
|
---|
| 7 | [![License][license-image]][license-url]
|
---|
| 8 | [![Downloads][downloads-image]][downloads-url]
|
---|
| 9 |
|
---|
| 10 | [![npm badge][npm-badge-png]][package-url]
|
---|
| 11 |
|
---|
| 12 | Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.
|
---|
| 13 |
|
---|
| 14 | ## Example
|
---|
| 15 |
|
---|
| 16 | ```js
|
---|
| 17 | var hasPropertyDescriptors = require('has-property-descriptors');
|
---|
| 18 | var assert = require('assert');
|
---|
| 19 |
|
---|
| 20 | assert.equal(hasPropertyDescriptors(), true); // will be `false` in IE 6-8, and ES5 engines
|
---|
| 21 |
|
---|
| 22 | // Arrays can not have their length `[[Defined]]` in some engines
|
---|
| 23 | assert.equal(hasPropertyDescriptors.hasArrayLengthDefineBug(), false); // will be `true` in Firefox 4-22, and node v0.6
|
---|
| 24 | ```
|
---|
| 25 |
|
---|
| 26 | ## Tests
|
---|
| 27 | Simply clone the repo, `npm install`, and run `npm test`
|
---|
| 28 |
|
---|
| 29 | [package-url]: https://npmjs.org/package/has-property-descriptors
|
---|
| 30 | [npm-version-svg]: https://versionbadg.es/inspect-js/has-property-descriptors.svg
|
---|
| 31 | [deps-svg]: https://david-dm.org/inspect-js/has-property-descriptors.svg
|
---|
| 32 | [deps-url]: https://david-dm.org/inspect-js/has-property-descriptors
|
---|
| 33 | [dev-deps-svg]: https://david-dm.org/inspect-js/has-property-descriptors/dev-status.svg
|
---|
| 34 | [dev-deps-url]: https://david-dm.org/inspect-js/has-property-descriptors#info=devDependencies
|
---|
| 35 | [npm-badge-png]: https://nodei.co/npm/has-property-descriptors.png?downloads=true&stars=true
|
---|
| 36 | [license-image]: https://img.shields.io/npm/l/has-property-descriptors.svg
|
---|
| 37 | [license-url]: LICENSE
|
---|
| 38 | [downloads-image]: https://img.shields.io/npm/dm/has-property-descriptors.svg
|
---|
| 39 | [downloads-url]: https://npm-stat.com/charts.html?package=has-property-descriptors
|
---|
| 40 | [codecov-image]: https://codecov.io/gh/inspect-js/has-property-descriptors/branch/main/graphs/badge.svg
|
---|
| 41 | [codecov-url]: https://app.codecov.io/gh/inspect-js/has-property-descriptors/
|
---|
| 42 | [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-property-descriptors
|
---|
| 43 | [actions-url]: https://github.com/inspect-js/has-property-descriptors/actions
|
---|