Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

has-tostringtag

inspect-js203.4mMIT1.0.2TypeScript support: included

Determine if the JS environment has Symbol.toStringTag support. Supports spec, or shams.

javascript, ecmascript, symbol, symbols, tostringtag, Symbol.toStringTag

readme

has-tostringtag Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Determine if the JS environment has Symbol.toStringTag support. Supports spec, or shams.

Example

var hasSymbolToStringTag = require('has-tostringtag');

hasSymbolToStringTag() === true; // if the environment has native Symbol.toStringTag support. Not polyfillable, not forgeable.

var hasSymbolToStringTagKinda = require('has-tostringtag/shams');
hasSymbolToStringTagKinda() === true; // if the environment has a Symbol.toStringTag sham that mostly follows the spec.

Supported Symbol shams

Tests

Simply clone the repo, npm install, and run npm test

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v1.0.2 - 2024-02-01

Fixed

  • [Fix] move has-symbols back to prod deps #3

v1.0.1 - 2024-02-01

Commits

  • [patch] add types 9276414
  • [meta] use npmignore to autogenerate an npmignore file 5c0dcd1
  • [actions] reuse common workflows dee9509
  • [actions] update codecov uploader b8cb3a0
  • [Tests] generate coverage be5b288
  • [Dev Deps] update eslint, @ljharb/eslint-config, safe-publish-latest, tape 69a0827
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, tape 4c9e210
  • [actions] update rebase action to use reusable workflow ca8dcd3
  • [Dev Deps] update @ljharb/eslint-config, aud, npmignore, tape 07f3eaf
  • [Deps] update has-symbols 999e009
  • [Tests] remove staging tests since they fail on modern node 9d9526b

v1.0.0 - 2021-08-05

Commits