租房小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
2.0 KiB

2 months ago
  1. # es-define-property <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
  2. [![github actions][actions-image]][actions-url]
  3. [![coverage][codecov-image]][codecov-url]
  4. [![License][license-image]][license-url]
  5. [![Downloads][downloads-image]][downloads-url]
  6. [![npm badge][npm-badge-png]][package-url]
  7. `Object.defineProperty`, but not IE 8's broken one.
  8. ## Example
  9. ```js
  10. const assert = require('assert');
  11. const $defineProperty = require('es-define-property');
  12. if ($defineProperty) {
  13. assert.equal($defineProperty, Object.defineProperty);
  14. } else if (Object.defineProperty) {
  15. assert.equal($defineProperty, false, 'this is IE 8');
  16. } else {
  17. assert.equal($defineProperty, false, 'this is an ES3 engine');
  18. }
  19. ```
  20. ## Tests
  21. Simply clone the repo, `npm install`, and run `npm test`
  22. ## Security
  23. Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
  24. [package-url]: https://npmjs.org/package/es-define-property
  25. [npm-version-svg]: https://versionbadg.es/ljharb/es-define-property.svg
  26. [deps-svg]: https://david-dm.org/ljharb/es-define-property.svg
  27. [deps-url]: https://david-dm.org/ljharb/es-define-property
  28. [dev-deps-svg]: https://david-dm.org/ljharb/es-define-property/dev-status.svg
  29. [dev-deps-url]: https://david-dm.org/ljharb/es-define-property#info=devDependencies
  30. [npm-badge-png]: https://nodei.co/npm/es-define-property.png?downloads=true&stars=true
  31. [license-image]: https://img.shields.io/npm/l/es-define-property.svg
  32. [license-url]: LICENSE
  33. [downloads-image]: https://img.shields.io/npm/dm/es-define-property.svg
  34. [downloads-url]: https://npm-stat.com/charts.html?package=es-define-property
  35. [codecov-image]: https://codecov.io/gh/ljharb/es-define-property/branch/main/graphs/badge.svg
  36. [codecov-url]: https://app.codecov.io/gh/ljharb/es-define-property/
  37. [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/es-define-property
  38. [actions-url]: https://github.com/ljharb/es-define-property/actions