string-sahayak
v1.1.0
Published
A lightweight, easy-to-use **TypeScript string utility library** for formatting, masking, cleaning, and validating text in JavaScript/TypeScript applications.
Readme
🧵 string-sahayak
A lightweight, easy-to-use TypeScript string utility library for formatting, masking, cleaning, and validating text in JavaScript/TypeScript applications.
Perfect for beginners, production-ready for real projects.
Built with ❤️ by Ramij Dafadar.
🚀 Features
🔤 Text Formatting
capitalize("hello world")→Hello worldtoTitleCase("welcome to india")→Welcome To IndiacamelCase("hello world")→helloWorldsnakeCase("Hello World")→hello_worldkebabCase("Hello World")→hello-world
🔐 Masking Utilities
maskPhone("9876543210")→987****210maskEmail("[email protected]")→r***@example.commaskAadhaar("123412341234")→1234 **** 1234maskString("password123", 1)→p**********maskPAN("ABCDE1234F")→A****1234FmaskCustom("abcdef", 2, 4)→ab**ef
✂️ Cleaning
removeSpaces("a b c")→abcremoveExtraSpaces(" Hello world ")→Hello worldonlyNumbers("AB12CD34")→1234onlyText("Hello123")→Hello
✔ Validation + Extra Tools
slugify("Hello World!")→hello-worldisValidURL("https://google.com")→truereverseString("Hello")→olleHisPalindrome("madam")→true
📦 Installation
npm install string-sahayak
# or
yarn add string-sahayak
# string-sahayak