https://github.com/jatiinyadav/string-utils
A TS compatible utility library for string manipulation.
https://github.com/jatiinyadav/string-utils
npm-package string-manipulation typescript
Last synced: 25 days ago
JSON representation
A TS compatible utility library for string manipulation.
- Host: GitHub
- URL: https://github.com/jatiinyadav/string-utils
- Owner: jatiinyadav
- License: mit
- Created: 2020-10-26T11:58:48.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-08-09T21:17:34.000Z (9 months ago)
- Last Synced: 2025-02-08T03:07:07.752Z (3 months ago)
- Topics: npm-package, string-manipulation, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/str-text-utils
- Size: 368 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://www.npmjs.com/package/str-text-utils)
# str-text-utilsstr-text-utils is a utility library for string manipulation, providing a set of functions to simplify common string operations such as converting to camelCase, capitalizing words, counting characters, checking for palindromes, reversing strings, and trimming whitespace.
## 🛠️ Installation
Install str-text-utils via npm:
```pre
npm install str-text-utils
```## ⭐ Usage
Import the functions you need from str-text-utils:
| Name | Usage | Output |
| :------------- |:-------------| :-----|
| Capitalize Words | capitalizeWords('the quick brown fox') | The Quick Brown Fox |
| Camel Case | toCamelCase('quick brown fox') | quickBrownFox |
| Trim Spaces | trimSpaces(' leading and trailing spaces ') | leading and trailing spaces |
| Word Count | wordCount('count the number of words') | 5 |
| Reverse String | reverseString('desserts') | stressed |
| Palindrone | isPalindrome('A man a plan a canal Panama') | true |
| Dot Case | toDotCase('dot case example') | dot.case.example |
| Sentence Case | toSentenceCase('this is a sentence. another one here!') | This is a sentence. Another one here! |
| Snake Case | toSnakeCase('Snake Case Example') | snake_case_example |
| Kebab Case | toKebabCase('My String to Kebab Case') | my-string-to-kebab-case |
| Pascal Case | toPascalCase('hello world') | HelloWorld |## 🚀 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
## ✨ Documentation in VS Code
When using this package in Visual Studio Code, you can get more information about each method by hovering over it.

## 📃 LICENSE
This package in under [MIT License](https://github.com/jatiinyadav/string-utils/blob/master/LICENSE).