Determine if the JS environment has `Symbol.toStringTag` support. Supports spec, or shams.
Installations
npm install has-tostringtag
Developer Guide
Typescript
Yes
Module System
CommonJS, ESM
Min. Node Version
>= 0.4
Node Version
21.6.0
NPM Version
10.2.4
Score
99.5
Supply Chain
80.2
Quality
75.4
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Love this project? Help keep it running โ sponsor us today! ๐
Developer
inspect-js
Download Statistics
Total Downloads
4,741,076,157
Last Day
8,019,211
Last Week
43,273,509
Last Month
178,414,227
Last Year
1,895,181,410
GitHub Statistics
MIT License
5 Stars
29 Commits
2 Forks
4 Watchers
1 Branches
1 Contributors
Updated on Dec 02, 2024
Bundle Size
1.30 kB
Minified
495.00 B
Minified + Gzipped
Sponsor this package
Package Meta Information
Latest Version
1.0.2
Package Id
has-tostringtag@1.0.2
Unpacked Size
17.19 kB
Size
6.31 kB
File Count
16
NPM Version
10.2.4
Node Version
21.6.0
Published on
Feb 01, 2024
Total Downloads
Cumulative downloads
Total Downloads
4,741,076,157
Last Day
1.2%
8,019,211
Compared to previous day
Last Week
3.2%
43,273,509
Compared to previous week
Last Month
42.6%
178,414,227
Compared to previous month
Last Year
27.4%
1,895,181,410
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
has-tostringtag 
Determine if the JS environment has Symbol.toStringTag
support. Supports spec, or shams.
Example
1var hasSymbolToStringTag = require('has-tostringtag'); 2 3hasSymbolToStringTag() === true; // if the environment has native Symbol.toStringTag support. Not polyfillable, not forgeable. 4 5var hasSymbolToStringTagKinda = require('has-tostringtag/shams'); 6hasSymbolToStringTagKinda() === 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

No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/inspect-js/.github/SECURITY.md:1
- Info: Found linked content: github.com/inspect-js/.github/SECURITY.md:1
- Warn: One or no descriptive hints of disclosure, vulnerability, and/or timelines in security policy
- Info: Found text in security policy: github.com/inspect-js/.github/SECURITY.md:1
Reason
4 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 4
Reason
Found 0/29 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Info: topLevel 'contents' permission set to 'read': .github/workflows/node-10-11.yml:6
- Info: topLevel 'contents' permission set to 'read': .github/workflows/node-12-13.yml:6
- Info: topLevel 'contents' permission set to 'read': .github/workflows/node-14-15.yml:6
- Warn: no topLevel permission defined: .github/workflows/node-16-17.yml:1
- Info: topLevel 'contents' permission set to 'read': .github/workflows/node-18-19.yml:6
- Info: topLevel 'contents' permission set to 'read': .github/workflows/node-20-21.yml:6
- Info: topLevel 'contents' permission set to 'read': .github/workflows/node-22+.yml:6
- Info: topLevel 'contents' permission set to 'read': .github/workflows/node-4-6.yml:6
- Info: topLevel 'contents' permission set to 'read': .github/workflows/node-7-9.yml:6
- Info: topLevel 'contents' permission set to 'read': .github/workflows/node-iojs.yml:6
- Warn: no topLevel permission defined: .github/workflows/node-pretest.yml:1
- Info: topLevel 'contents' permission set to 'read': .github/workflows/node-zero.yml:6
- Warn: no topLevel permission defined: .github/workflows/rebase.yml:1
- Warn: no topLevel permission defined: .github/workflows/require-allow-edits.yml:1
- Info: no jobLevel write permissions found
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-10-11.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-10-11.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-10-11.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-10-11.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-10-11.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-10-11.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-10-11.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-10-11.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-10-11.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-10-11.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-10-11.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-10-11.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-10-11.yml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-10-11.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-12-13.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-12-13.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-12-13.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-12-13.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-12-13.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-12-13.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-12-13.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-12-13.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-12-13.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-12-13.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-12-13.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-12-13.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-12-13.yml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-12-13.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-14-15.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-14-15.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-14-15.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-14-15.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-14-15.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-14-15.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-14-15.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-14-15.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-14-15.yml:63: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-14-15.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-14-15.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-14-15.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-14-15.yml:69: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-14-15.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-16-17.yml:33: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-16-17.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-16-17.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-16-17.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-16-17.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-16-17.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-16-17.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-16-17.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-16-17.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-16-17.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-16-17.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-16-17.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-16-17.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-16-17.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-18-19.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-18-19.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-18-19.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-18-19.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-18-19.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-18-19.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-18-19.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-18-19.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-18-19.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-18-19.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-18-19.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-18-19.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-18-19.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-18-19.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-20-21.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-20-21.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-20-21.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-20-21.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-20-21.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-20-21.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-20-21.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-20-21.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-20-21.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-20-21.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-20-21.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-20-21.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-20-21.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-20-21.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-22+.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-22+.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-22+.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-22+.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-22+.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-22+.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-22+.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-22+.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-22+.yml:61: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-22+.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-22+.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-22+.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-22+.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-22+.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-4-6.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-4-6.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-4-6.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-4-6.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-4-6.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-4-6.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-4-6.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-4-6.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-4-6.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-4-6.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-4-6.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-4-6.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-4-6.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-4-6.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-7-9.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-7-9.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-7-9.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-7-9.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-7-9.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-7-9.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-7-9.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-7-9.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-7-9.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-7-9.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-7-9.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-7-9.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-7-9.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-7-9.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-iojs.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-iojs.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-iojs.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-iojs.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-iojs.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-iojs.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-iojs.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-iojs.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-iojs.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-iojs.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-iojs.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-iojs.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-iojs.yml:71: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-iojs.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-zero.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-zero.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-zero.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-zero.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-zero.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-zero.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/node-zero.yml:65: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-zero.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-zero.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-zero.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-zero.yml:73: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-zero.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/node-zero.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/node-zero.yml/main?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/require-allow-edits.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/inspect-js/has-tostringtag/require-allow-edits.yml/main?enable=pin
- Info: 0 out of 22 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 56 third-party GitHubAction dependencies pinned
Score
4.8
/10
Last Scanned on 2025-02-03
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More