Hey devs! π I just released a tiny, powerful package called case-text-utils β a utility that helps you convert between string cases effortlessly.
π§ Step 1: Install it
npm install case-text-utils
π§ Step 2: Import what you need
import {
toCamel,
toSnake,
toKebab,
toPascal,
convertCase
} from 'case-text-utils';
β‘ Step 3: Use it (Examples)
toCamel('hello_world-text'); // β "helloWorldText"
toSnake('helloWorldText'); // β "hello_world_text"
toPascal('hello_world-text'); // β "HelloWorldText"
_Or use the universal converter_:
convertCase('user_name-key', 'pascal');
// β "UserNameKey"
β Why use case-text-utils?
πͺΆ Just 2KB
π¦ Zero dependencies
π§Ό Clean ESM
π Works in both Node.js & browser
π One-liner conversions
π¦ NPM Link:- https://www.npmjs.com/package/case-text-utils
β If you find it useful, give it a try and star the repo!Feel free to share feedback or suggestions. π
Top comments (0)