Package category
Strings and text
Slugify, escape, pad, pluralise, diff and transform text.
205 packages1 comparisons
Packages compared
205 packages
| Package | Weekly downloads | 12-month change | 52 weeks | Gzip | Last release | Module | Types | Categories |
|---|---|---|---|---|---|---|---|---|
| boolstring Converts a string like true, on, or enabled into a boolean. | 49.7k | -60% | - | 2 years ago 2.0.1 | ESM + CommonJS | Bundled | Strings and text | |
| varname Convert strings between different variable naming formats | 43.9k | +22% | - | 14 days ago 8.1.0 | ESM only | Bundled | Strings and text | |
| word-wrapper wraps words based on arbitrary 2D glyphs | 38.2k | +2% | - | 11 years ago 1.0.7 | CommonJS | None | Strings and text | |
| path-starts-with Returns true if a filepath starts with the given string. Works with windows and posix/unix paths. | 36.4k | -33% | - | 3 years ago 2.0.1 | CommonJS | None | Strings and text, Files and file systems | |
| module-from-string Load module from string using require or import. | 34.6k | +20% | - | 2 years ago 3.3.1 | ESM + CommonJS | Bundled | Strings and text, Build tools | |
| normalize-text Provides a simple API to normalize texts, white-spaces, paragraphs & diacritics. | 32.4k | +46% | - | 1 year ago 2.6.0 | ESM + CommonJS | Bundled | Strings and text, Utility libraries | |
| tokenizr String Tokenization Library for JavaScript | 31.3k | -15% | - | 5 months ago 2.2.1 | ESM + CommonJS | Bundled | Parsers and serialisers, Strings and text | |
| to-slug-case Convert a string to slug case. | 29.4k | +65% | - | 10 years ago 1.0.0 | - | None | Strings and text | |
| @stdlib/string String manipulation functions. | 29k | - | - | - | 3 months ago 0.4.1 | CommonJS | Bundled | Strings and text |
| @gerhobbelt/linewrap Word wrapping with HTML, ANSI color code, indentation and paragraphing support. | 27k | - | - | - | 8 years ago 0.2.2-3 | CommonJS | None | Strings and text |
| string.prototype.at An ES-spec-compliant (proposed) String.prototype.at shim/polyfill/replacement that works as far down as ES3 | 26.9k | +254% | - | 2 years ago 1.0.6 | CommonJS | None | Polyfills and shims, Strings and text | |
| string-escape-regex A tiny function for escaping a string to be used as the source in a regex. | 24.4k | -18% | - | 1 year ago 1.0.1 | ESM only | Bundled | Strings and text | |
| namespace-guard Cross-script confusable detection, slug safety, and LLM Denial of Spend defence. Zero dependencies. | 24.3k | - | - | today 0.22.0 | ESM + CommonJS | Bundled | ORMs and query builders, TypeScript tooling | |
| stringcase Convert string cases between camel case, pascal case, snake case etc... | 24.2k | +21% | - | 7 years ago 4.3.1 | CommonJS | Bundled | Strings and text | |
| format-string-by-pattern A module that formats a string based on a pattern | 23.2k | +79% | - | 5 years ago 1.2.2 | ESM + CommonJS | Bundled | Strings and text | |
| to-case Simple case conversion and detection for strings. | 22.8k | +82% | - | 10 years ago 2.0.0 | CommonJS | None | Strings and text | |
| mudder Find lexicographical points between strings | 21.9k | +166% | - | 3 years ago 2.1.1 | ESM + CommonJS | None | Strings and text | |
| is-binary-buffer Returns true if a buffer is binary. Takes a buffer and does not read from the file system. | 20.2k | -19% | - | 8 years ago 2.0.0 | CommonJS | None | Files and file systems, Node.js utilities | |
| pluralizers Repository of localized pluralization functions | 19.3k | +44% | - | 8 years ago 0.1.7 | CommonJS | None | Internationalisation, Strings and text | |
| similarity How similar are these two strings? | 17.3k | -59% | - | 6 years ago 1.2.1 | CommonJS | None | Strings and text | |
| postcss-replace PostCSS plugin for replacing strings. | 16.7k | +14% | - | 3 years ago 2.0.1 | CommonJS | None | CSS-in-JS and styling, Strings and text | |
| @stdlib/string-base-trim Trim whitespace characters from the beginning and end of a string. | 15k | - | - | - | 7 months ago 0.2.3 | CommonJS | Bundled | Strings and text |
| qsu Everyday helpers you would otherwise write yourself: slugs, text case, date math, number and file size formatting, deep clone and merge, email and URL validation, debounce, throttle and hashing. No dependencies. | 14.1k | -35% | - | 5 days ago 1.20.0 | ESM only | Bundled | Utility libraries, Strings and text | |
| montag format multiline strings using tagged templates, instead of putting all lines into an array and joining to a string | 13.6k | -35% | - | 9 days ago 2.0.3 | ESM only | Bundled | Strings and text, Node.js utilities | |
| slugg Make strings url safe (with no dependencies) | 13.5k | -14% | - | 9 years ago 1.2.1 | CommonJS | None | Strings and text | |
| replace-special-characters Remove accents and replace special Latin characters with plain equivalents | 12.6k | +44% | - | 1 month ago 2.0.1 | CommonJS | Bundled | Strings and text | |
| @spacingbat3/lss LSS: Literal String Sanitizer – sanitizes string based on specific inputs and tries to guess the accurate type (in TypeScript/Typed JS). | 12.5k | - | - | - | 3 years ago 1.2.0 | ESM + CommonJS | Bundled | TypeScript tooling, Strings and text |
| human-number Convert number to a human readable string: `13500` → `13.5K` | 11.4k | +265% | - | 5 months ago 3.0.0 | CommonJS | None | Strings and text | |
| @stdlib/constants-unicode-max Maximum Unicode code point. | 11.1k | - | - | - | 7 months ago 0.2.3 | CommonJS | Bundled | Strings and text |
| @stdlib/string-from-code-point Create a string from a sequence of Unicode code points. | 11.1k | - | - | - | 7 months ago 0.2.3 | CommonJS | Bundled | Utility libraries, Strings and text |
| @stdlib/constants-unicode-max-bmp Maximum Unicode code point in the Basic Multilingual Plane (BMP). | 11.1k | - | - | - | 7 months ago 0.2.3 | CommonJS | Bundled | Strings and text |
| sanity-plugin-prefixed-slug Editor friendly slug fields for your Sanity.io studio | 10.9k | +1567% | - | 3 years ago 2.0.0 | ESM + CommonJS | Bundled | Strings and text | |
| crypto-random-string-with-promisify-polyfill Generate a cryptographically strong random string | 10.5k | +186% | - | 4 years ago 5.0.0 | - | None | Cryptography and hashing, Strings and text | |
| trim-x This method removes whitespace from the left and right end of a string. | 9.6k | +8% | - | 7 years ago 4.1.2 | ESM + CommonJS | None | DOM and browser utilities, Node.js utilities | |
| trim-left-x This method removes whitespace from the left end of a string. | 9.6k | +8% | - | 7 years ago 4.1.2 | ESM + CommonJS | None | DOM and browser utilities, Node.js utilities | |
| replace-comments-x Replace the comments in a string. | 9.5k | +13% | - | 7 years ago 3.1.2 | ESM + CommonJS | None | DOM and browser utilities, Node.js utilities | |
| decancer A library that removes common unicode confusables/homoglyphs from strings. | 9.3k | +5598% | - | 9 days ago 4.0.0 | CommonJS | Bundled | Security, Strings and text | |
| reregexp Generate a random string match a given regular expression, suitable for mocking strings. | 8.7k | +216% | - | 3 years ago 1.6.1 | ESM + CommonJS | Bundled | Dev servers and API mocking, Strings and text | |
| @vierofernando/decancer-linux-arm64-gnu A library that removes common unicode confusables/homoglyphs from strings. (Binary port for linux-arm64-gnu) | 8.7k | - | - | - | 9 days ago 4.0.0 | CommonJS | None | Security, Strings and text |
| @supercharge/strings String utilities for Node.js and JavaScript | 8.3k | - | - | - | 3 years ago 2.0.0 | CommonJS | Bundled | Strings and text, Utility libraries |
| decamelize-keys-deep Deeply convert the camelized keys of an object into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow | 7.9k | +31% | - | 9 years ago 0.1.1 | CommonJS | None | Strings and text | |
| @thi.ng/strings Various string formatting & utility functions | 7.9k | - | - | - | 30 days ago 3.12.10 | ESM only | Bundled | Strings and text, Utility libraries |
| json_ Converts camelCase JavaScript objects to JSON snake_case and vise versa. | 7.3k | -15% | - | 4 years ago 3.0.1 | ESM + CommonJS | Bundled | Strings and text, Parsers and serialisers | |
| linewrap Word wrapping with HTML, ANSI color code, indentation and paragraphing support. | 7k | -51% | - | 13 years ago 0.2.1 | CommonJS | None | Strings and text | |
| string.prototype.towellformed An ESnext spec-compliant `String.prototype.toWellFormed` shim/polyfill/replacement that works as far down as ES3. | 6.9k | +213% | - | 2 years ago 1.0.2 | CommonJS | None | Polyfills and shims, Strings and text | |
| @stdlib/string-uncapitalize Uncapitalize the first character of a string. | 6.3k | - | - | - | 7 months ago 0.3.1 | CommonJS | Bundled | Utility libraries, Strings and text |
| @esm2cjs/indent-string Indent each line in a string. This is a fork of sindresorhus/indent-string, but with CommonJS support. | 6.2k | - | - | - | 4 years ago 5.0.0 | ESM + CommonJS | Bundled | Strings and text |
| kebabcase-keys Convert object keys to kebab-case | 5.8k | +466% | - | 7 years ago 1.0.0 | - | None | Utility libraries, Strings and text | |
| @stdlib/string-base-capitalize Capitalize the first character in a string. | 5.6k | - | - | - | 7 months ago 0.3.1 | CommonJS | Bundled | Strings and text |
| @stacksjs/strings The Stacks string utilities. | 5.4k | - | - | - | today 0.74.68 | ESM only | Bundled | Strings and text, TypeScript tooling |
12-month change compares the average of the last 4 weeks of downloads with the first 4 weeks of the 52-week series. Gzip size is for the whole package, as measured by Bundlephobia. "-" means the value has not been fetched.
- boolstringConverts a string like true, on, or enabled into a boolean.
- varnameConvert strings between different variable naming formats
- word-wrapperwraps words based on arbitrary 2D glyphs
- path-starts-withReturns true if a filepath starts with the given string. Works with windows and posix/unix paths.
- module-from-stringLoad module from string using require or import.
- normalize-textProvides a simple API to normalize texts, white-spaces, paragraphs & diacritics.
- tokenizrString Tokenization Library for JavaScript
- to-slug-caseConvert a string to slug case.
- @stdlib/stringString manipulation functions.
- @gerhobbelt/linewrapWord wrapping with HTML, ANSI color code, indentation and paragraphing support.
- string.prototype.atAn ES-spec-compliant (proposed) String.prototype.at shim/polyfill/replacement that works as far down as ES3
- string-escape-regexA tiny function for escaping a string to be used as the source in a regex.
- namespace-guardCross-script confusable detection, slug safety, and LLM Denial of Spend defence. Zero dependencies.
- stringcaseConvert string cases between camel case, pascal case, snake case etc...
- format-string-by-patternA module that formats a string based on a pattern
- to-caseSimple case conversion and detection for strings.
- mudderFind lexicographical points between strings
- is-binary-bufferReturns true if a buffer is binary. Takes a buffer and does not read from the file system.
- pluralizersRepository of localized pluralization functions
- similarityHow similar are these two strings?
- postcss-replacePostCSS plugin for replacing strings.
- @stdlib/string-base-trimTrim whitespace characters from the beginning and end of a string.
- qsuEveryday helpers you would otherwise write yourself: slugs, text case, date math, number and file size formatting, deep clone and merge, email and URL validation, debounce, throttle and hashing. No dependencies.
- montagformat multiline strings using tagged templates, instead of putting all lines into an array and joining to a string
- sluggMake strings url safe (with no dependencies)
- replace-special-charactersRemove accents and replace special Latin characters with plain equivalents
- @spacingbat3/lssLSS: Literal String Sanitizer – sanitizes string based on specific inputs and tries to guess the accurate type (in TypeScript/Typed JS).
- human-numberConvert number to a human readable string: `13500` → `13.5K`
- @stdlib/constants-unicode-maxMaximum Unicode code point.
- @stdlib/string-from-code-pointCreate a string from a sequence of Unicode code points.
- @stdlib/constants-unicode-max-bmpMaximum Unicode code point in the Basic Multilingual Plane (BMP).
- sanity-plugin-prefixed-slugEditor friendly slug fields for your Sanity.io studio
- crypto-random-string-with-promisify-polyfillGenerate a cryptographically strong random string
- trim-xThis method removes whitespace from the left and right end of a string.
- trim-left-xThis method removes whitespace from the left end of a string.
- replace-comments-xReplace the comments in a string.
- decancerA library that removes common unicode confusables/homoglyphs from strings.
- reregexpGenerate a random string match a given regular expression, suitable for mocking strings.
- @vierofernando/decancer-linux-arm64-gnuA library that removes common unicode confusables/homoglyphs from strings. (Binary port for linux-arm64-gnu)
- @supercharge/strings String utilities for Node.js and JavaScript
- decamelize-keys-deepDeeply convert the camelized keys of an object into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow
- @thi.ng/stringsVarious string formatting & utility functions
- json_Converts camelCase JavaScript objects to JSON snake_case and vise versa.
- linewrapWord wrapping with HTML, ANSI color code, indentation and paragraphing support.
- string.prototype.towellformedAn ESnext spec-compliant `String.prototype.toWellFormed` shim/polyfill/replacement that works as far down as ES3.
- @stdlib/string-uncapitalizeUncapitalize the first character of a string.
- @esm2cjs/indent-stringIndent each line in a string. This is a fork of sindresorhus/indent-string, but with CommonJS support.
- kebabcase-keysConvert object keys to kebab-case
- @stdlib/string-base-capitalizeCapitalize the first character in a string.
- @stacksjs/stringsThe Stacks string utilities.