sindresorhus / string-length
Get the real length of a string - by correctly counting astral symbols and ignoring ansi escape codes
☆165Updated 9 months ago
Alternatives and similar repositories for string-length:
Users that are interested in string-length are comparing it to the libraries listed below
- Get the visual width of a string - the number of columns required to display it☆487Updated 8 months ago
- Truncate a string to a specific width in the terminal☆87Updated last year
- Easily handle defaults for your options☆73Updated last year
- Move a file - Even works across devices☆198Updated last year
- Normalize file path slashes to be unix-like forward slashes. Used by chokidar, anymatch, and many others!☆110Updated 2 years ago
- Wordwrap a string with ANSI escape codes☆123Updated last year
- Find the closest package.json file☆162Updated last year
- Get a stream as a string, Buffer, ArrayBuffer or array☆345Updated 4 months ago
- Read the closest package.json file☆266Updated last year
- Toggle the CLI cursor☆107Updated 7 months ago
- Find the root directory of a Node.js project or npm package☆240Updated last year
- Clear a module from the cache☆181Updated 3 years ago
- Read a package.json file☆165Updated last year
- Check if a string or buffer is SVG☆134Updated 7 months ago
- Finds the common standard cache directory☆158Updated last year
- Get a random temporary file path☆79Updated 2 years ago
- Reverse minimist. Convert an object of options into an array of command-line arguments☆185Updated 2 years ago
- Get an unused filename by appending a number if it exists: `file.txt` → `file (1).txt`☆140Updated 2 years ago
- Check whether a package or organization name is available on npm☆169Updated last year
- Get metadata of a package from the npm registry☆240Updated 8 months ago
- Convert a tilde path to an absolute path: ~/dev => /Users/sindresorhus/dev☆144Updated last year
- Get a random temporary file or directory path☆427Updated last year
- Strip UTF-8 byte order mark (BOM) from a string☆111Updated 3 years ago
- Detect the indentation of code☆196Updated last year
- Get the gzipped size of a string or buffer☆171Updated 3 years ago
- Filter out OS junk files like .DS_Store and Thumbs.db☆241Updated last year
- Filter object keys and values into a new object☆101Updated 9 months ago
- Check if argv has a specific flag☆94Updated 3 years ago
- Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow☆238Updated 2 years ago
- when you want to fire an event no matter how a process exits.☆190Updated last year