has-tostringtag <sup>Version Badge</sup>

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

has-tostringtag - Installation

To install has-tostringtag via this registry, you'll need to install via the --registry parameter with your package manager.

n

NPM

npm install has-tostringtag --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Yarn

yarn config set registry https://js.registry.sudovanilla.org
yarn install has-tostringtag

Learn more about the config option.

PNPM

pnpm install has-tostringtag --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Bun Logo

Bun

bun install has-tostringtag --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Learn more about setting this up in your bunfig.toml configuration.


For Deno, add the following to your .npmrc file in your directory:

registry="https://js.registry.sudovanilla.org"

Then run the deno install command.

has-tostringtag - Download

Download Tarball (v1.0.2)

Integrity sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==
SHASUM 2cdc42d40bef2e5b4eeab7c01a73c54ce7ab5abc
Tarball https://js.registry.sudovanilla.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz