Installations
npm install js-tokens
Developer Guide
Typescript
Yes
Module System
ESM
Node Version
22.8.0
NPM Version
10.8.2
Score
99.6
Supply Chain
70.2
Quality
80.9
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (79.82%)
CoffeeScript (15.4%)
TypeScript (4.78%)
Developer
lydell
Download Statistics
Total Downloads
10,120,803,717
Last Day
3,948,837
Last Week
24,636,875
Last Month
190,110,635
Last Year
2,451,840,343
GitHub Statistics
505 Stars
150 Commits
33 Forks
7 Watching
1 Branches
3 Contributors
Bundle Size
5.38 kB
Minified
1.97 kB
Minified + Gzipped
Package Meta Information
Latest Version
9.0.1
Package Id
js-tokens@9.0.1
Unpacked Size
15.69 kB
Size
4.33 kB
File Count
5
NPM Version
10.8.2
Node Version
22.8.0
Publised On
22 Nov 2024
Total Downloads
Cumulative downloads
Total Downloads
10,120,803,717
Last day
-15%
3,948,837
Compared to previous day
Last week
-40.9%
24,636,875
Compared to previous week
Last month
-13.8%
190,110,635
Compared to previous month
Last year
16.5%
2,451,840,343
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
No dependencies detected.
js-tokens
The tiny, regex powered, lenient, almost spec-compliant JavaScript tokenizer that never fails.
1const jsTokens = require("js-tokens"); 2 3const jsString = 'JSON.stringify({k:3.14**2}, null /*replacer*/, "\\t")'; 4 5Array.from(jsTokens(jsString), (token) => token.value).join("|"); 6// JSON|.|stringify|(|{|k|:|3.14|**|2|}|,| |null| |/*replacer*/|,| |"\t"|)
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
3 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-mwcw-c2x4-8c55
Reason
2 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 2
Reason
dependency not pinned by hash detected -- score normalized to 2
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/lydell/js-tokens/check.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/lydell/js-tokens/check.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/lydell/js-tokens/check.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/lydell/js-tokens/test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/lydell/js-tokens/test.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/lydell/js-tokens/test.yml/main?enable=pin
- Info: 0 out of 6 GitHub-owned GitHubAction dependencies pinned
- Info: 2 out of 2 npmCommand dependencies pinned
Reason
Found 1/22 approved changesets -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/check.yml:1
- Warn: no topLevel permission defined: .github/workflows/test.yml:1
- Info: no jobLevel write permissions found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 18 are checked with a SAST tool
Score
3.5
/10
Last Scanned on 2024-12-30
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 MoreOther packages similar to js-tokens
loose-envify
Fast (and loose) selective `process.env` replacer using js-tokens instead of an AST
@paprika/tokens
Design tokens generated as scss + js
opensea-js
TypeScript SDK for the OpenSea marketplace helps developers build new experiences using NFTs and our marketplace data
@stitches/react
The modern CSS-in-JS library