phane-tech-string-utils
v1.0.2
Published
Pure JavaScript DOM utility functions
Downloads
195
Maintainers
Readme
📦 Kotipalli Phaneendra Kumar – String Helpers
A lightweight, safe, and predictable string utility library that provides common string operations with strict validation, consistent return values, and clean JSDoc documentation.
Designed for browser and JavaScript environments, these helpers handle invalid inputs gracefully by returning undefined instead of throwing errors.
✨ Highlights
- String length utilities
- Uppercase & lowercase helpers
- Trim / remove spaces
- Replace & replace-all helpers
- String concatenation
- Repeat & split utilities
- Case-insensitive word checks
- Fully documented with JSDoc
- Predictable return values
📦 Installation
npm install phane-tech-string-utils🚀 Import
import {
checkStringLength,
changeToUpperCase,
changeToLowerCase,
removeSpaces,
replaceWord,
replaceAllWords,
concateTwoWords,
repeatTheWord,
splitTheWord,
checkTheWord
} from "phane-js-string-helpers";
📚 Usage Examples
checkStringLength("hello"); // 5
changeToUpperCase("hello"); // "HELLO"
changeToLowerCase("HELLO"); // "hello"
removeSpaces(" hello "); // "hello"
replaceWord("js are nice", "are", "is"); // "js is nice"
replaceAllWords("are are", "are", "is"); // "is is"
concateTwoWords("Phane", "Kumar"); // "Phane Kumar"
repeatTheWord("Hi", 3); // "HiHiHi"
splitTheWord("Phane Kumar", " "); // ["Phane", "Kumar"]
checkTheWord("Phane Kumar", "phane"); // true🧪 Design Principles
- ❌ Invalid input returns →
undefined - ✅ Safe string operations
- 🔁 No side effects
- 📖 Clear and predictable APIs
📄 License
MIT
👤 Author
Kotipalli Phaneendra Kumar
🔗 Links
- GitHub Repository: https://phane-tech.github.io/phane-tech-string-utils
- Demo / Documentation: https://phane-tech.github.io/phane-tech-string-utils/module-StringHelpers.html
- Unit Test Cases Reports: https://phane-tech.github.io/phane-tech-string-utils/unit-test-report.html
