string-length
npmv7.0.1TypeScriptGet the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes
Overview
string-length is an npm package that get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes. The latest version is 7.0.1, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes and value a focused solution.
When not to use it
Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.
Pros
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
- Lean dependency tree (2 direct dependencies).
Cons
- No significant drawbacks detected from available metadata.
Auto-generated from collected registry metadata. No external claims are inferred.
Relationship graph
Dependencies (left) and dependents (right) of string-length.
Dependencies
Dev (2)
Used by
Popular packages that depend on string-length.
Alternatives to string-length
Get the visual width of a string - the number of columns required to display it
Create clickable links in the terminal
Strip UTF-8 byte order mark (BOM) from a string
Escape RegExp special characters
Given some data, jsesc returns the shortest possible stringified & ASCII-safe representation of that data.
Determine the East Asian Width of a Unicode character
Escape string for use in HTML
Elegant terminal spinner
🌈Easily set your terminal text color & styles.
Functions for dealing with a PostgreSQL connection string
Get the line and column number of a specific character in a string
🛡️ Faster SQL escape and format for JavaScript (Node.js, Bun, and Deno).
Frequently installed together
No description provided.
No description provided.
A Node.js module for sending notifications on native Mac, Windows (post and pre 8) and Linux (or Growl as fallback)
TypeScript definitions for node
No description provided.
the most correct and second fastest glob implementation in JavaScript
Trace the original position through a source map
No description provided.
No description provided.
No description provided.
Convert Windows backslash paths to slash paths
TypeScript definitions for istanbul-reports
Version history
| Version | Published | License |
|---|---|---|
| 7.0.1latest | 6 months ago | MIT |
| 7.0.0 | 6 months ago | MIT |
| 6.0.0 | 3 years ago | MIT |
| 5.0.1 | 4 years ago | MIT |
| 5.0.0 | 5 years ago | MIT |
| 4.0.2 | 5 years ago | MIT |
| 4.0.1 | 6 years ago | MIT |
| 4.0.0 | 6 years ago | MIT |
| 3.1.0 | 7 years ago | MIT |
| 3.0.0 | 7 years ago | MIT |
| 2.0.0 | 9 years ago | MIT |
| 1.0.1 | 11 years ago | MIT |
| 1.0.0 | 12 years ago | MIT |
| 0.1.2 | 12 years ago | MIT |
| 0.1.1 | 12 years ago | MIT |
| 0.1.0 | 12 years ago | MIT |
Maintainers
Funding
Frequently asked questions
How do I install string-length?
Run `npm install string-length` to add string-length to your npm project.
What license is string-length released under?
string-length is distributed under the MIT license.
How popular is string-length?
string-length has approximately 0 downloads per week and 2 known dependent packages.