Get the visual width of a string - the number of columns required to display it
☆523Feb 18, 2026Updated 2 months 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☆136Feb 20, 2026Updated 2 months ago
- Managed Database hosting by DigitalOcean • AdPostgreSQL, MySQL, MongoDB, Kafka, Valkey, and OpenSearch available. Automatically scale up storage and focus on building your apps.
- 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 2 years ago
- Fallback to a default if `process.stdout.getWindowSize` doesn't exist☆24Jan 21, 2026Updated 3 months ago
- Reliably get the terminal window size☆147Feb 2, 2026Updated 2 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☆91Apr 4, 2026Updated 3 weeks ago
- Managed hosting for WordPress and PHP on Cloudways • AdManaged hosting for WordPress, Magento, Laravel, or PHP apps, on multiple cloud providers. Deploy in minutes on Cloudways by DigitalOcean.
- 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 7 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
- Managed hosting for WordPress and PHP on Cloudways • AdManaged hosting for WordPress, Magento, Laravel, or PHP apps, on multiple cloud providers. Deploy in minutes on Cloudways by DigitalOcean.
- 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 7 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
- Wordpress hosting with auto-scaling - Free Trial Offer • AdFully Managed hosting for WordPress and WooCommerce businesses that need reliable, auto-scalable performance. Cloudways SafeUpdates now available.
- 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 2 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