Simple string helper function
npm install @nd-460/string-utils
bash
npm install string-utils
`
---
---
📖 Interactive Reference
Click to expand function reference
| 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 | "