Get the visual width of a string - the number of columns required to display it
☆521Feb 18, 2026Updated last month
Alternatives and similar repositories for string-width
Users that are interested in string-width are comparing it to the libraries listed below. We may earn a commission when you buy through links labeled 'Ad' on this page.
Sorting:
- Get the visual width of the widest line in a string - the number of columns required to display it☆40Jan 24, 2026Updated 2 months ago
- Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes☆171Jan 21, 2026Updated 2 months ago
- Check if the character represented by a given Unicode code point is fullwidth☆51Aug 31, 2025Updated 7 months ago
- Node.js 0.12 path.isAbsolute() ponyfill☆43Jan 24, 2021Updated 5 years ago
- Wordwrap a string with ANSI escape codes☆136Feb 20, 2026Updated last month
- Bare Metal GPUs on DigitalOcean Gradient AI • AdPurpose-built for serious AI teams training foundational models, running large-scale inference, and pushing the boundaries of what's possible.
- Check if a path is the current working directory☆22May 10, 2025Updated 11 months ago
- Get a random key from an object☆18Jul 2, 2024Updated last year
- Check if a file path is a binary file☆49Apr 30, 2024Updated last year
- Fallback to a default if `process.stdout.getWindowSize` doesn't exist☆24Jan 21, 2026Updated 2 months ago
- Reliably get the terminal window size☆146Feb 2, 2026Updated 2 months ago
- Similar to String#trim() but removes only whitespace on the right☆22Jul 9, 2021Updated 4 years ago
- Truncate a string to a specific width in the terminal☆88Mar 1, 2026Updated last month
- Gracefully restore the CLI cursor on exit☆41Jul 26, 2024Updated last year
- Check if a number is a redirect HTTP status code☆25Apr 17, 2021Updated 4 years ago
- 1-Click AI Models by DigitalOcean Gradient • AdDeploy popular AI models on DigitalOcean Gradient GPU virtual machines with just a single click and start building anything your business needs.
- Check if a path is a file, directory, or symlink☆80Feb 2, 2026Updated 2 months ago
- Get the PATH environment variable key cross-platform☆46Sep 12, 2025Updated 6 months ago
- Check if argv has a specific flag☆96Jul 19, 2021Updated 4 years ago
- Prepend `https://` to humanized URLs like `sindresorhus.com` and `localhost`☆66Sep 9, 2025Updated 7 months ago
- Regular expression for matching a shebang line☆48Aug 13, 2021Updated 4 years ago
- Repeat a string - fast☆35May 3, 2021Updated 4 years ago
- Invert the key/value of an object. Example: {foo: 'bar'} → {bar: 'foo'}☆37Feb 26, 2022Updated 4 years ago
- Check if a value is a plain object☆104May 4, 2024Updated last year
- Try to guess if your terminal supports unicode☆18Dec 16, 2020Updated 5 years ago
- Proton VPN Special Offer - Get 70% off • AdSpecial partner offer. Trusted by over 100 million users worldwide. Tested, Approved and Recommended by Experts.
- Get a random property from an object☆15Jul 2, 2024Updated last year
- Check if a path is in the current working directory☆23May 3, 2021Updated 4 years ago
- ☆20Oct 18, 2021Updated 4 years ago
- Toggle the CLI cursor☆113Jul 26, 2024Updated last year
- Unpipe a stream from all destinations☆22Dec 15, 2020Updated 5 years ago
- Check if a path is inside another path☆40Sep 11, 2025Updated 6 months ago
- Get your PATH prepended with locally installed binaries☆108Oct 28, 2024Updated last year
- align-text with ANSI support for CLIs☆24Sep 27, 2021Updated 4 years ago
- ES2015 Number.isFinite() ponyfill☆20Apr 7, 2021Updated 5 years ago
- NordVPN Special Discount Offer • AdSave on top-rated NordVPN 1 or 2-year plans with secure browsing, privacy protection, and support for for all major platforms.
- Map `visit` over an array of objects.☆17Jun 27, 2022Updated 3 years ago
- node's assert.deepEqual algorithm except for the fact that (NaN === NaN) and (+0 !== -0).☆21Sep 4, 2021Updated 4 years ago
- `Promise#finally()` ponyfill - Invoked when the promise is settled regardless of outcome☆47Apr 9, 2021Updated 5 years ago
- Check if a value is an object☆42Apr 16, 2021Updated 4 years ago
- Lowercase the keys of an object☆41Feb 2, 2026Updated 2 months ago
- Check if something is a Node.js stream☆115Oct 28, 2024Updated last year
- Prepend `https://` to humanized URLs like `sindresorhus.com` and `file://` to file paths☆25Jul 9, 2022Updated 3 years ago