96fc63fcf6e34513ef7c664ec95c6b1cf0863e445793a15e6450f5595154dda476522016d0f714ef4cc7f0dcd8466bf8ee89265ae9020be5199113c51bb3dd 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # has-tostringtag <sup>[![Version Badge][2]][1]</sup>
  2. [![github actions][actions-image]][actions-url]
  3. [![coverage][codecov-image]][codecov-url]
  4. [![dependency status][5]][6]
  5. [![dev dependency status][7]][8]
  6. [![License][license-image]][license-url]
  7. [![Downloads][downloads-image]][downloads-url]
  8. [![npm badge][11]][1]
  9. Determine if the JS environment has `Symbol.toStringTag` support. Supports spec, or shams.
  10. ## Example
  11. ```js
  12. var hasSymbolToStringTag = require('has-tostringtag');
  13. hasSymbolToStringTag() === true; // if the environment has native Symbol.toStringTag support. Not polyfillable, not forgeable.
  14. var hasSymbolToStringTagKinda = require('has-tostringtag/shams');
  15. hasSymbolToStringTagKinda() === true; // if the environment has a Symbol.toStringTag sham that mostly follows the spec.
  16. ```
  17. ## Supported Symbol shams
  18. - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols)
  19. - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js)
  20. ## Tests
  21. Simply clone the repo, `npm install`, and run `npm test`
  22. [1]: https://npmjs.org/package/has-tostringtag
  23. [2]: https://versionbadg.es/inspect-js/has-tostringtag.svg
  24. [5]: https://david-dm.org/inspect-js/has-tostringtag.svg
  25. [6]: https://david-dm.org/inspect-js/has-tostringtag
  26. [7]: https://david-dm.org/inspect-js/has-tostringtag/dev-status.svg
  27. [8]: https://david-dm.org/inspect-js/has-tostringtag#info=devDependencies
  28. [11]: https://nodei.co/npm/has-tostringtag.png?downloads=true&stars=true
  29. [license-image]: https://img.shields.io/npm/l/has-tostringtag.svg
  30. [license-url]: LICENSE
  31. [downloads-image]: https://img.shields.io/npm/dm/has-tostringtag.svg
  32. [downloads-url]: https://npm-stat.com/charts.html?package=has-tostringtag
  33. [codecov-image]: https://codecov.io/gh/inspect-js/has-tostringtag/branch/main/graphs/badge.svg
  34. [codecov-url]: https://app.codecov.io/gh/inspect-js/has-tostringtag/
  35. [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-tostringtag
  36. [actions-url]: https://github.com/inspect-js/has-tostringtag/actions