@muerteseguraz/string-toolkit
v1.0.0
Published
A handy toolkit for common string manipulations in JavaScript.
Maintainers
Readme
# string-toolkit
A handy toolkit for common string manipulations in JavaScript.
---
## Features
- Convert strings to **slug** format
- Convert strings to **kebab-case**
- Convert strings to **camelCase**
- **Truncate** strings to a specified length
- **Strip ANSI** escape codes (colors, styles)
- **Strip HTML** tags
- **Remove emojis** from strings
---
## Installation
```bash
npm install string-toolkitUsage
import { slugify, kebabCase, camelCase, truncate, stripAnsi, stripHtml, removeEmoji } from 'string-toolkit';
console.log(slugify("Hello World!")); // hello-world
console.log(kebabCase("Hello World!")); // hello-world
console.log(camelCase("Hello World!")); // helloWorld
console.log(truncate("This is a long text", 10)); // This is...
console.log(stripAnsi("\x1b[31mRed Text\x1b[0m")); // Red Text
console.log(stripHtml("<p>Hello</p>")); // Hello
console.log(removeEmoji("Hello 👋🌍")); // HelloContributing
Feel free to open issues or submit pull requests!
License
MIT © MuerteSeguraZ
