npm package: @nd-460/string-utils
Description: Simple string helper function
Author: ND-460
Latest version: 1.5.1


# string-utils

✨ Simple string helper functions for everyday use.

![npm](https://img.shields.io/npm/v/string-utils?style=flat-square) 
![npm downloads](https://img.shields.io/npm/dt/string-utils?style=flat-square)
![license](https://img.shields.io/npm/l/string-utils?style=flat-square)

---

## 📦 Installation

```bash
npm install string-utils
```

---


---

## 📖 Interactive Reference

<details>
<summary>Click to expand function reference</summary>

| Function            | Example Input                     | Example Output                           |
| ------------------- | --------------------------------- | ---------------------------------------- |
| `capitalizeWords`   | `"hello world"`                   | `"Hello World"`                          |
| `toLowerCaseWords`  | `"HELLO"`                         | `"hello"`                                |
| `reverseString`     | `"hello"`                         | `"olleh"`                                |
| `isPalindrome`      | `"Ono"`                           | `true`                                   |
| `toTitleCase`       | `"hello world"`                   | `"Hello World"`                          |
| `toCamelCase`       | `"hello_world"`                   | `"helloWorld"`                           |
| `toSnakeCase`       | `"HelloWorld"`                    | `"hello_world"`                          |
| `toKebabCase`       | `"Hello World"`                   | `"hello-world"`                          |
| `toPascalCase`      | `"hello world"`                   | `"HelloWorld"`                           |
| `truncate`          | `"Hello world, this is cool", 10` | `"Hello wor..."`                         |
| `removeExtraSpaces` | `"  hello world  "`               | `"hello world"`                          |
| `repeatString`      | `"abc", 3`                        | `"abcabcabc"`                            |
| `isAlpha`           | `"hello123"`                      | `false`                                  |
| `isNumeric`         | `"123"`                           | `true`                                   |
| `isAlphaNumeric`    | `"abc123"`                        | `true`                                   |
| `isEmail`           | `"neel@example.com"`              | `true`                                   |
| `isUrl`             | `"https://openai.com"`            | `true`                                   |
| `toBase64`          | `"hello"`                         | `"aGVsbG8="`                             |
| `fromBase64`        | `"aGVsbG8="`                      | `"hello"`                                |
| `slugify`           | `"Hello World!!"`                 | `"hello-world"`                          |
| `escapeHtml`        | `"<script>"`                      | `"&lt;script&gt;"`                       |
| `toCurrencyWords`   | `1234`                            | `"One Thousand Two Hundred Thirty Four"` |
| `maskAadhaar`       | `"1234 5678 9123"`                | `"XXXX XXXX 9123"`                       |
| `maskPhone`         | `"+91-9876543210"`                | `"+91-XXXXXX3210"`                       |
| `shuffle`           | `"neel"`                          | `"elen"` (random order)                  |
| `randomString`      | `8`                               | `"aZkL90xQ"` (random string)             |
| `stylize`           | `"hello", "✨"`                    | `"✨h✨e✨l✨l✨o✨"`                          |

</details>

---

## 🛠 Contributing

Pull requests are welcome.
For major changes, please open an issue first to discuss what you would like to change.