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