stringate
v1.0.2
Published
A lightweight JavaScript library for performing common string operations and transformations.
Maintainers
Readme
🔠 stringate
A modern and lightweight JavaScript utility library for all your string manipulation needs — from casing, formatting, and trimming to checking palindromes and removing digits or special characters.
Simple. Fast. Developer-friendly.
📦 Installation
npm install stringate🚀 Quick Start
const stringate = require('stringate');
console.log(stringate.capitalize('hello world')); // "Hello World"
console.log(stringate.reverse('hello')); // "olleh"
console.log(stringate.kebabCase('Hello World')); // "hello-world"
console.log(stringate.isPalindrome('Madam')); // true📋 Available Functions
🔡 Basic Formatting
- toUpperCase(str)
- toLowerCase(str)
- capitalize(str)
- reverse(str)
- concat(...strings)
🔍 Checks & Info
- isPalindrome(str)
- includes(str, search)
- startsWith(str, search)
- endsWith(str, search)
- stringLength(str)
- countVowels(str)
- charAt(str, index)
🪄 Case Conversions
- kebabCase(str)
- camelCase(str)
- snakeCase(str)
✂️ Trimming & Slicing
- trim(str)
- trimStart(str)
- trimEnd(str)
- substring(str, start, end)
- split(str, delimiter)
🧼 Cleanup Utilities
- removeSpaces(str)
- removeSpecialChars(str)
- removeDigits(str)
- replaceAll(str, search, replacement)
🔁 Repeating & Padding
- repeat(str, times)
- padStart(str, targetLength, padChar)
- padEnd(str, targetLength, padChar)
🧪 Testing
You can test the library locally:
node test.jsExample test.js:
const stringate = require('./index');
console.log(stringate.toUpperCase('test')); // "TEST"
console.log(stringate.countVowels('sanjana')); // 3👤 Author
Made with 💙 by Sanjana Tankala
📄 License
ISC License
