sindresorhus/string-width
Get the visual width of a string - the number of columns required to display it
⚡ Executive Summary & Quick Facts
Authoritative Sourcestring-width is string-width is an open-source project written in JavaScript: Get the visual width of a string - the number of columns required to display it..
“According to real-time open source telemetry recorded on GitHubRepo.cloud (as of December 2026), sindresorhus/string-width has accumulated 531 GitHub stars and 42 forks. It is written in JavaScript, licensed under MIT, and ranks #14,451 globally. It is actively maintained with the latest commit recorded on Nov 11, 2026.”
| Repository | sindresorhus/string-width ↗ |
|---|---|
| Primary Category | developer tools |
| Language & Stack | JavaScript |
| Software License | MIT |
| Community Traction | ★ 531 stars · ⑂ 42 forks · #14,451 globally |
| Maintenance | ● Active (Last commit: Nov 11, 2026) · 2 open issues |
| Target Audience | Developers and engineering teams building with JavaScript, seeking reliable, tested, and actively maintained tooling for production workloads. |
🛡️ Repository Maintenance & Health Audit (2026)
Health Score: 88/100 · Grade AYes, string-width is actively maintained. Continuous telemetry recorded the last code commit on Nov 11, 2026 (23 days ago). Supported by 531 stars and 42 community forks, this repository holds a calculated health index of 88/100, reflecting regular maintenance (23 days ago) and healthy issue cadence.
Star History
Add Live Star History & Verified Badges to README.md
Keep your repository README looking professional and dynamic. As our continuous crawler records new stars, these official SVG badges update in real time with zero maintenance.
Renders your high-resolution star trajectory chart right inside your GitHub README or project docs.
[](https://githubrepo.cloud/repo/sindresorhus/string-width?utm_source=readme_chart)
Compact badges for your README header. Real-time stars, velocity, health audit, and rank.
[](https://githubrepo.cloud/repo/sindresorhus/string-width?utm_source=readme_badge) [](https://githubrepo.cloud/repo/sindresorhus/string-width?utm_source=readme_badge) [](https://githubrepo.cloud/repo/sindresorhus/string-width?utm_source=readme_badge) [](https://githubrepo.cloud/repo/sindresorhus/string-width?utm_source=readme_badge) [](https://githubrepo.cloud/repo/sindresorhus/string-width?utm_source=readme_badge)
Momentum
+13
STARS · LAST 30 DAYS
1
PER DAY
#1,291
MOST-STARRED JavaScript
| Window | 7 days | 30 days | 90 days |
|---|---|---|---|
| Stars gained | +0 | +13 | +90 |
| Per day | 1 | 1 | 1 |
| Forks gained | +0 | +3 | +10 |
string-width gained 13 stars in the last 30 days, about 1 a day, and now has 531. It is about 11 years old and has averaged roughly 48 stars a year. It ranks #1,291 among JavaScript repositories and #14,451 across all languages on GitHubRepo.
Trending Record
18
DAYS ON TRENDING
#15047
BEST RANK
Nov 12, 2026
FIRST APPEARANCE
Active
STATUS TODAY
string-width has maintained a continuous presence across global trending indexes, peaking at #15047. Below is the 30-day activity profile:
💡 Overview
string-width is an open-source project written in JavaScript: Get the visual width of a string - the number of columns required to display it.
Engineered for speed, consistency, and developer ease, it solves common hurdles in JavaScript. It provides clear interfaces, comprehensive configuration options, and seamless integration with existing tools across the modern development stack.
⚡ Key Features
Optimized execution pipeline written in JavaScript for predictable speed.
Zero-friction configuration with comprehensive sensible defaults out of the box.
Cross-platform runtime support across Linux, macOS, and Windows environments.
Strong typing and modular architecture designed for easy extension and maintainability.
Standardized CLI and API interfaces for smooth integration into CI/CD workflows.
Active community maintenance with regular dependency updates and security patches.
📥 Installation
$ npm install string-width
⚙ System Requirements
Platforms
- • macOS
- • Linux
- • Windows
Runtime & Dependencies
Node.js >= 18 or modern Evergreen browser
Architecture
x86_64, ARM64 (Apple Silicon & Graviton)
🧠 How It Works
string-width coordinates its core functionality through a modular JavaScript pipeline. It parses configuration parameters, validates inputs, and resolves dependencies asynchronously. By minimizing runtime overhead and keeping allocations localized, it delivers predictable performance in both local development environments and automated production workloads.
🎯 Production Use Cases
Production System Integration
Embed string-width into JavaScript backend services to handle core application logic.
CI/CD Automated Pipelines
Run automated validation, builds, and integration suites during deployments.
Developer Tooling & Workflows
Accelerate developer onboarding with pre-configured project utilities.
Open Source Extension
Fork and customize internal modules under the repository's open MIT license.
🚀 Getting Started
Install string-width using your package manager: `npm install string-width`
Initialize your project workspace or configuration file for string-width.
Import string-width into your codebase or invoke it directly from your terminal.
Execute your test suite or run `string-width --help` to verify successful setup.
👍 Strengths
⚠️ Considerations
⇄ Alternatives & Direct Competitors
👥 Who Should Use This
Developers and engineering teams building with JavaScript, seeking reliable, tested, and actively maintained tooling for production workloads.
🏆 Nearby in the Rankings
sindresorhus/string-width is currently ranked #14,451 by stars across every repository tracked on GitHubRepo. These are adjacent projects:
| Rank | Repository | Language | Stars | Action |
|---|---|---|---|---|
| #14,433 | papi-ux/polaris | C++ | ★ 532 | Compare ↗ |
| #14,433 | rssh-org/rssh | Rust | ★ 532 | Compare ↗ |
| #14,433 | kageroumado/adrafinil | Swift | ★ 532 | Compare ↗ |
| #14,433 | aerovato/operator-memory | TypeScript | ★ 532 | Compare ↗ |
| #14,433 | abacusai/abacusai-bot | TypeScript | ★ 532 | Compare ↗ |
| #14,451 | sindresorhus/string-width This Project | JavaScript | ★ 531 | |
| #14,451 | TwP/logging | Ruby | ★ 531 | Compare ↗ |
| #14,451 | alexyoung/ircd.js | JavaScript | ★ 531 | Compare ↗ |
| #14,451 | git-friendly/git-friendly | Shell | ★ 531 | Compare ↗ |
| #14,451 | jcarolus/android-chess | Java | ★ 531 | Compare ↗ |
| #14,451 | sakusaku3939/DA-Translator | Kotlin | ★ 531 | Compare ↗ |
Frequently Asked Questions
What does string-width do? +
Get the visual width of a string - the number of columns required to display it
Is string-width actively maintained in 2026? +
Yes, string-width is actively maintained. The latest code push was recorded on Nov 11, 2026 (23 days ago). It holds a calculated Maintenance Health Score of 88/100 (A rating) with 531 stars and 2 open issues.
What language is string-width written in? +
The primary language is JavaScript. Topics include: software.
How many stars does string-width have? +
string-width has 531 stars and 42 forks on GitHub.
How does string-width rank among GitHub repositories? +
With 531 stars, sindresorhus/string-width is ranked #14,451 globally across all repositories tracked on GitHubRepo and #1,291 among JavaScript projects.
What license is string-width distributed under? +
The repository reports a MIT license. Always verify the repository LICENSE file for legal terms.