Get the visual width of a string - the number of columns required to display it
☆526Apr 27, 2026Updated 3 weeks ago
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 3 months ago
- Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes☆172Jan 21, 2026Updated 3 months ago
- Check if the character represented by a given Unicode code point is fullwidth☆51Aug 31, 2025Updated 8 months ago
- Node.js 0.12 path.isAbsolute() ponyfill☆43Jan 24, 2021Updated 5 years ago
- Wordwrap a string with ANSI escape codes☆137Feb 20, 2026Updated 3 months ago
- Deploy on Railway without the complexity - Free Credits Offer • AdConnect your repo and Railway handles the rest with instant previews. Quickly provision container image services, databases, and storage volumes.
- Check if a path is the current working directory☆22May 10, 2025Updated last year
- Get a random key from an object☆18Jul 2, 2024Updated last year
- Check if a file path is a binary file☆49Apr 30, 2024Updated 2 years ago
- Reliably get the terminal window size☆147Feb 2, 2026Updated 3 months ago
- Fallback to a default if `process.stdout.getWindowSize` doesn't exist☆24Jan 21, 2026Updated 3 months ago
- Similar to String#trim() but removes only whitespace on the right☆22Jul 9, 2021Updated 4 years ago
- 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 5 years ago
- Truncate a string to a specific width in the terminal☆93Apr 4, 2026Updated last month
- Deploy to Railway using AI coding agents - Free Credits Offer • AdUse Claude Code, Codex, OpenCode, and more. Autonomous software development now has the infrastructure to match with Railway.
- Check if a path is a file, directory, or symlink☆80Feb 2, 2026Updated 3 months ago
- Get the PATH environment variable key cross-platform☆46Sep 12, 2025Updated 8 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 8 months ago
- Regular expression for matching a shebang line☆48Aug 13, 2021Updated 4 years ago
- Repeat a string - fast☆35May 3, 2021Updated 5 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 2 years ago
- Try to guess if your terminal supports unicode☆18Dec 16, 2020Updated 5 years ago
- End-to-end encrypted email - Proton Mail • AdSpecial offer: 40% Off Yearly / 80% Off First Month. All Proton services are open source and independently audited for security.
- 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 5 years ago
- ☆20Oct 18, 2021Updated 4 years ago
- Toggle the CLI cursor☆114Jul 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 8 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
- Deploy on Railway without the complexity - Free Credits Offer • AdConnect your repo and Railway handles the rest with instant previews. Quickly provision container image services, databases, and storage volumes.
- 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 5 years ago
- Lowercase the keys of an object☆41Feb 2, 2026Updated 3 months ago
- Check if something is a Node.js stream☆116Oct 28, 2024Updated last year
- Prepend `https://` to humanized URLs like `sindresorhus.com` and `file://` to file paths☆25Jul 9, 2022Updated 3 years ago