string-case-utils
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

STRING-CASE-UTILS

A lightweight TypeScript utility library for common string manipulation tasks, including case conversions, whitespace removal, numeric checks, and more.

✨ Features

  • Convert strings to camelCase, snake_case, kebab-case, and Title Case
  • Check if a string contains UPPERCASE and lowercase
  • Capitalize words or entire strings
  • Reverse strings
  • Remove whitespace
  • Count occurrences of substrings
  • Truncate strings with ellipses

📦 Installation

npm install string-case-utils


| Function                  | Description                             |
| ------------------------- | -------------------------------------   |
| `camelCase()`             | Converts a string to camelCase          |
| `capitalize()`            | Capitalizes the first letter            |
| `countOccurrences()`      | Counts substring occurrences            |
| `isContainLowerCase()`    | Checks if the string contains lowercase |
| `isContainUpperCase()`    | Checks if the string contains uppercase |
| `isNumeric()`             | Checks if the string is numeric         |
| `kebabCase()`             | Converts a string to kebab-case         |
| `removeWhitespace()`      | Removes all whitespace                  |
| `reverse()`               | Reverses the string                     |
| `snakeCase()`             | Converts a string to snake_case        |
| `titleCase()`             | Converts a string to Title Case         |
| `truncate()`              | Truncates a string to a given length    |

Package Sidebar

Install

npm i string-case-utils

Weekly Downloads

1

Version

1.0.4

License

MIT

Unpacked Size

10.1 kB

Total Files

47

Last publish

Collaborators

  • iamswetabh