string-width
Get the visual width of a string - the number of columns required to display it
29
Versions
MIT
License
No
Install Scripts
Missing
Provenance
Supply chain provenance
Status for the latest visible version.
No SLSA provenance
npm registry signatures
gitHead linked
Without SLSA provenance there is no cryptographic link between this tarball and the public source — the axios compromise (March 2026) relied on exactly this gap.
Maintainers
sindresorhus
Keywords
stringcharacterunicodewidthvisualcolumncolumnsfullwidthfull-widthwcwidthwcswidthfullansiescapecodesclicommand-lineterminalconsolecjkchinesejapanesekoreanfixed-widtheast-asian-width
Accepted risks
Findings the reviewer chose to accept rather than block on.
| Source | Rule | Reason | Accepted by | When |
|---|---|---|---|---|
| publish-pattern | new-deps-added | AI (publish-pattern): The new dep (eastasianwidth) is a legitimate, well-known utility that directly serves string-width's core purpose of measuring East Asian character widths. This is a benign dependency swap, not an attack vector. | ai | |
| dependencies | unvetted-dep:code-point-at | AI (dependencies): code-point-at is a well-known sindresorhus utility; a legitimate and expected dependency for string-width across all versions. | ai | |
| dependencies | unvetted-dep:eastasianwidth | AI (dependencies): eastasianwidth is a legitimate Unicode East Asian Width utility that directly serves string-width's core purpose of computing visual widths for CJK characters. Stable dependency choice for this package. | ai | |
| provenance | no-provenance | AI (provenance): sindresorhus is a highly trusted publisher; missing provenance is common for packages of this age and does not represent a meaningful risk here. | ai |
Versions (showing 29 of 29)
| Version | Deps | Published |
|---|---|---|
| 8.2.1 | 2 / 3 | |
| 8.2.0 | 2 / 3 | |
| 8.1.1 | 2 / 3 | |
| 8.1.0 | 2 / 3 | |
| 8.0.0 | 2 / 3 | |
| 7.2.0 | 3 / 3 | |
| 7.1.0 | 3 / 3 | |
| 7.0.0 | 3 / 3 | |
| 6.1.0 | 3 / 3 | |
| 6.0.0 | 3 / 3 | |
| 5.1.2 | 3 / 3 | |
| 5.1.1 | 3 / 3 | |
| 5.1.0 | 3 / 3 | |
| 5.0.1 | 3 / 3 | |
| 5.0.0 | 3 / 3 | |
| 4.2.3 | 3 / 3 | |
| 4.2.2 | 3 / 3 | |
| 4.2.1 | 3 / 3 | |
| 4.2.0 | 3 / 3 | |
| 4.1.0 | 3 / 3 | |
| 4.0.0 | 3 / 3 | |
| 3.1.0 | 3 / 2 | |
| 3.0.0 | 3 / 2 | |
| 2.1.1 | 2 / 2 | |
| 2.1.0 | 2 / 2 | |
| 2.0.0 | 2 / 2 | |
| 1.0.2 | 3 / 2 | |
| 1.0.1 | 3 / 1 | |
| 1.0.0 | 3 / 1 |
v8.2.1
1 finding
INFO
No provenance attestation
provenance
[Accepted risk] Package was published without Sigstore provenance. Consider requesting the maintainer enable provenance via CI/CD.