Skip to content
JS
Package

string-length

Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes

v7.0.1, 21 Jan 2026MITESM onlyTypes: BundledCLI tools and terminal utilitiesStrings and text
$ npm install string-length

Key numbers

As of 25 Sept 2026
Weekly downloads
41.3m
+24% over 12 months
Gzip bundle size
-
No Bundlephobia data
Dependencies
0
Direct, from package.json
Last release
8 months ago
v7.0.1
GitHub stars
171
12 forks
Open issues / PRs
0 / 0
Contributors
10
Commits, last 52 weeks
6

Downloads

Last week 2026-09-15 to 2026-09-21
020m40m60mSept 2025Mar 2026Sept 2026High 53.2m (25 Aug 2026)Low 19.1m (23 Dec 2025)
Weekly npm downloads, one point per week, weeks starting 23 Sept 2025 to 15 Sept 2026. The y axis starts at zero.

41,329,150 downloads last week, 191,990,490 in the last month. The 12-month change of +24% compares the average of the last 4 weeks with the first 4 weeks of the series.

Releases, last 12 months
216 in total
Latest version
7.0.1, 21 Jan 20268 months ago
First published
16 Apr 2014
Last push to GitHub
25 Jul 202661 days before the snapshot
Repository archived
No
Open issues
0
Open pull requests
0
Commits, last 52 weeks
6
Dependents on npm
1,123

Major versions

  1. v7 first release 7.0.0, 21 Jan 2026
  2. v6 first release 6.0.0, 4 Jun 2023
  3. v5 first release 5.0.0, 5 Jun 2021
  4. v4 first release 4.0.0, 21 Feb 2020
  5. v3 first release 3.0.0, 18 Mar 2019
  6. v2 first release 2.0.0, 27 Jul 2017
  7. v1 first release 1.0.0, 13 Aug 2014
  8. v0 first release 0.1.0, 16 Apr 2014

Recent releases

VersionPublished
7.0.121 Jan 2026
7.0.021 Jan 2026
6.0.04 Jun 2023
5.0.113 Sept 2021
5.0.05 Jun 2021
4.0.217 Mar 2021
4.0.119 Mar 2020
4.0.021 Feb 2020
3.1.02 Apr 2019
3.0.018 Mar 2019
2.0.027 Jul 2017
1.0.116 Jul 2015
1.0.013 Aug 2014
0.1.21 May 2014
Module format
ESM onlyFrom package.json type, main and exports fields
TypeScript types
Bundled
Node.js engine range
>=20
Runtimes
-
Unpacked size (npm)
4.3 kB
Dependencies (0)
None
npm install string-length
  • jsDelivrhttps://cdn.jsdelivr.net/npm/string-length@7.0.1/
  • unpkghttps://unpkg.com/string-length@7.0.1/
  • esm.shhttps://esm.sh/string-length@7.0.1
PackageWeekly downloadsGzipLast releaseModuleComparison
fast-string-width23.9m-11 months agoESM only-
fast-string-truncated-width24.1m-11 months agoESM only-
Sources: npm registry, npm downloads API, GitHub API. Data fetched 25 Sept 2026.

Indexability: Indexed.